From df7ffaf4cb722890ca3159c3839c61552f7195d3 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Thu, 15 May 2025 04:37:12 +0700
Subject: all working now...

---
 src/pages/db.tsx | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 src/pages/db.tsx

(limited to 'src/pages/db.tsx')

diff --git a/src/pages/db.tsx b/src/pages/db.tsx
new file mode 100644
index 0000000..4251e6f
--- /dev/null
+++ b/src/pages/db.tsx
@@ -0,0 +1,35 @@
+import { Link } from "waku";
+import db from "../lib/db";
+
+export default async function AboutPage() {
+  const data = await getData();
+
+  return (
+    <div>
+      <title>Well</title>
+      <div className="flex flex-wrap gap-4">
+        {data.categories.categories.map((cat) => (
+          <div key={cat} className="p-2 cursor-pointer border-2 border-solid">
+            {cat}
+          </div>
+        ))}
+      </div>
+      <Link to="/" className="mt-4 inline-block underline">
+        Return home
+      </Link>
+    </div>
+  );
+}
+
+const getData = async () => {
+  const categories = db.fetchCats();
+  const eng = db.fetchLanguage("en");
+
+  return { categories, eng };
+};
+
+export const getConfig = async () => {
+  return {
+    render: "static",
+  } as const;
+};
-- 
cgit v1.2.3

