summaryrefslogtreecommitdiff
path: root/examples/fast-build/src
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@matthewphillips.info> 2021-12-30 11:52:22 -0500
committerGravatar GitHub <noreply@github.com> 2021-12-30 11:52:22 -0500
commit2e55dc2686b0e2bff2e2ec76c184a17a3d2368c4 (patch)
tree4a3910fd8297d5dbc8fd5560139b1c3e23be7ebd /examples/fast-build/src
parentae1e61aec8b1c1ce3ebb4e45359151b584adb1c6 (diff)
downloadastro-2e55dc2686b0e2bff2e2ec76c184a17a3d2368c4.tar.gz
astro-2e55dc2686b0e2bff2e2ec76c184a17a3d2368c4.tar.zst
astro-2e55dc2686b0e2bff2e2ec76c184a17a3d2368c4.zip
Revert "Implement hydrated components in the static build (#2260)" (#2292)
* Revert "Implement hydrated components in the static build (#2260)" This reverts commit ae5255dd25e36da2ce03f515af7b8f1ec6fcac91. * Adds a changeset
Diffstat (limited to 'examples/fast-build/src')
-rw-r--r--examples/fast-build/src/components/Counter.vue24
-rw-r--r--examples/fast-build/src/pages/[pokemon].astro20
-rw-r--r--examples/fast-build/src/pages/index.astro18
3 files changed, 6 insertions, 56 deletions
diff --git a/examples/fast-build/src/components/Counter.vue b/examples/fast-build/src/components/Counter.vue
deleted file mode 100644
index 599bcf615..000000000
--- a/examples/fast-build/src/components/Counter.vue
+++ /dev/null
@@ -1,24 +0,0 @@
-<template>
- <div id="vue" class="counter">
- <button @click="subtract()">-</button>
- <pre>{{ count }}</pre>
- <button @click="add()">+</button>
- </div>
-</template>
-
-<script>
-import { ref } from 'vue';
-export default {
- setup() {
- const count = ref(0);
- const add = () => (count.value = count.value + 1);
- const subtract = () => (count.value = count.value - 1);
-
- return {
- count,
- add,
- subtract,
- };
- },
-};
-</script>
diff --git a/examples/fast-build/src/pages/[pokemon].astro b/examples/fast-build/src/pages/[pokemon].astro
deleted file mode 100644
index ea01cc4f7..000000000
--- a/examples/fast-build/src/pages/[pokemon].astro
+++ /dev/null
@@ -1,20 +0,0 @@
----
-import Greeting from '../components/Greeting.vue';
-
-export async function getStaticPaths() {
- const response = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=2000`);
- const result = await response.json();
- const allPokemon = result.results;
- return allPokemon.map(pokemon => ({params: {pokemon: pokemon.name}, props: {pokemon}}));
-}
----
-<html lang="en">
- <head>
- <title>Hello</title>
- </head>
-
- <body>
- <h1>{Astro.props.pokemon.name}</h1>
- <Greeting client:load />
- </body>
-</html> \ No newline at end of file
diff --git a/examples/fast-build/src/pages/index.astro b/examples/fast-build/src/pages/index.astro
index ee228aa19..2bdadbf5b 100644
--- a/examples/fast-build/src/pages/index.astro
+++ b/examples/fast-build/src/pages/index.astro
@@ -2,7 +2,6 @@
import imgUrl from '../images/penguin.jpg';
import grayscaleUrl from '../images/random.jpg?grayscale=true';
import Greeting from '../components/Greeting.vue';
-import Counter from '../components/Counter.vue';
---
<html>
@@ -27,14 +26,9 @@ import Counter from '../components/Counter.vue';
<Greeting />
</section>
- <section>
- <h1>ImageTools</h1>
- <img src={grayscaleUrl} />
- </section>
-
- <section>
- <h1>Hydrated component</h1>
- <Counter client:idle />
- </section>
-</body>
-</html> \ No newline at end of file
+ <section>
+ <h1>ImageTools</h1>
+ <img src={grayscaleUrl} />
+ </section>
+ </body>
+</html>