From 8751ba26ebf7b7761b9e237f2bf3453623dd1018 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Mon, 6 Oct 2025 10:13:39 +0700
Subject: added frontend WS connection for demonstration purposes

---
 gui/src/Router.tsx | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 gui/src/Router.tsx

(limited to 'gui/src/Router.tsx')

diff --git a/gui/src/Router.tsx b/gui/src/Router.tsx
new file mode 100644
index 0000000..ee3aa0d
--- /dev/null
+++ b/gui/src/Router.tsx
@@ -0,0 +1,39 @@
+import Sidebar from "@/components/layout/Sidebar";
+
+// new
+import Feed from "@/pages/Feed";
+import Settings from "@/pages/Settings";
+import Thread from "@/pages/Thread";
+import { Switch, Router, Redirect, Route } from "wouter";
+
+export default function r() {
+  return (
+    <Switch>
+      <Router base="/apps/nostrill">
+        <Sidebar />
+        <main>
+          <Route path="/" component={toGlobal} />
+          <Route path="/sets" component={Settings} />
+          <Route path="/feed/:taip" component={Feed} />
+          <Route path="/feed/:host/:id" component={Thread} />
+        </main>
+      </Router>
+      <Route component={P404} />
+    </Switch>
+  );
+}
+function toGlobal() {
+  return <Redirect to="/feed/nostr" />;
+}
+
+export function P404() {
+  return <h1 className="x-center">404</h1>;
+}
+export function ErrorPage({ msg }: { msg: string }) {
+  return (
+    <div>
+      <P404 />
+      <h3>{msg}</h3>
+    </div>
+  );
+}
-- 
cgit v1.2.3

