summaryrefslogtreecommitdiff
path: root/front/src/Router.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'front/src/Router.tsx')
-rw-r--r--front/src/Router.tsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/front/src/Router.tsx b/front/src/Router.tsx
new file mode 100644
index 0000000..b7b033e
--- /dev/null
+++ b/front/src/Router.tsx
@@ -0,0 +1,29 @@
+import Sidebar from "@/components/layout/Sidebar";
+
+// new
+import Feed from "@/pages/Feed";
+import Settings from "@/pages/Settings";
+import { Switch, Router, Redirect, Route } from "wouter";
+
+export default function r() {
+ return (
+ <Switch>
+ <Router base="/apps/nostril">
+ <Sidebar />
+ <main>
+ <Route path="/" component={toGlobal} />
+ <Route path="/sets" component={Settings} />
+ <Route path="/feed/:taip" component={Feed} />
+ </main>
+ </Router>
+ <Route component={P404} />
+ </Switch>
+ );
+}
+function toGlobal() {
+ return <Redirect to="/feed/nostr" />;
+}
+
+export function P404() {
+ return <h1 className="x-center">404</h1>;
+}