summaryrefslogtreecommitdiff
path: root/src/pages/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/index.tsx')
-rw-r--r--src/pages/index.tsx35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
new file mode 100644
index 0000000..c008c4d
--- /dev/null
+++ b/src/pages/index.tsx
@@ -0,0 +1,35 @@
+import { Link } from "waku";
+
+import { Counter } from "../components/counter";
+
+export default async function HomePage() {
+ const data = await getData();
+
+ return (
+ <div>
+ <title>{data.title}</title>
+ <h1 className="text-4xl font-bold tracking-tight">{data.headline}</h1>
+ <p>{data.body}</p>
+ <Counter />
+ <Link to="/about" className="mt-4 inline-block underline">
+ About page
+ </Link>
+ </div>
+ );
+}
+
+const getData = async () => {
+ const data = {
+ title: "Waku",
+ headline: "Waku",
+ body: "Hello world!",
+ };
+
+ return data;
+};
+
+export const getConfig = async () => {
+ return {
+ render: "static",
+ } as const;
+};