aboutsummaryrefslogtreecommitdiff
path: root/packages/astro/e2e/fixtures/hydration-race/src/components/One.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/e2e/fixtures/hydration-race/src/components/One.jsx')
-rw-r--r--packages/astro/e2e/fixtures/hydration-race/src/components/One.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/astro/e2e/fixtures/hydration-race/src/components/One.jsx b/packages/astro/e2e/fixtures/hydration-race/src/components/One.jsx
new file mode 100644
index 000000000..7b76c8f6c
--- /dev/null
+++ b/packages/astro/e2e/fixtures/hydration-race/src/components/One.jsx
@@ -0,0 +1,8 @@
+import { h } from 'preact';
+
+export default function({ name }) {
+ const inTheClient = import.meta.env.SSR ? '' : ' in the client'
+ return (
+ <div id={name.toLowerCase()}>Hello {name}{inTheClient}</div>
+ );
+}