From 420a543f8af3075502b0a7530a0fa06af264eb8b Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Tue, 18 Nov 2025 16:59:24 +0700
Subject: refactoring gui too, improvements to Nostr user logic

---
 gui/src/Router.tsx | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

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

diff --git a/gui/src/Router.tsx b/gui/src/Router.tsx
index ee3aa0d..5026ef0 100644
--- a/gui/src/Router.tsx
+++ b/gui/src/Router.tsx
@@ -1,12 +1,14 @@
 import Sidebar from "@/components/layout/Sidebar";
-
-// new
+import useLocalState from "@/state/state";
 import Feed from "@/pages/Feed";
+import User from "@/pages/User";
 import Settings from "@/pages/Settings";
 import Thread from "@/pages/Thread";
 import { Switch, Router, Redirect, Route } from "wouter";
+import { P404 } from "./pages/Error";
 
 export default function r() {
+  const modal = useLocalState((s) => s.modal);
   return (
     <Switch>
       <Router base="/apps/nostrill">
@@ -14,26 +16,17 @@ export default function r() {
         <main>
           <Route path="/" component={toGlobal} />
           <Route path="/sets" component={Settings} />
-          <Route path="/feed/:taip" component={Feed} />
-          <Route path="/feed/:host/:id" component={Thread} />
+          <Route path="/f" component={Feed} />
+          <Route path="/f/:taip" component={Feed} />
+          <Route path="/u/:user" component={User} />
+          <Route path="/t/:host/:id" component={Thread} />
         </main>
+        {modal && modal}
       </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>
-  );
+  return <Redirect to="/f" />;
 }
-- 
cgit v1.2.3

