Initialize Minabot with Hono and React Router

This commit is contained in:
syntaxbullet
2026-09-04 07:40:35 +02:00
commit 23e9f4c717
18 changed files with 553 additions and 0 deletions

27
src/App.tsx Normal file
View File

@@ -0,0 +1,27 @@
import { Route, Routes, useLocation, useNavigate } from "react-router";
import { Home } from "./pages/Home";
import { About } from "./pages/About";
import { Settings } from "./pages/Settings";
export function App() {
const navigate = useNavigate();
const { pathname } = useLocation();
return (
<>
<nav aria-label="Main navigation">
<button type="button" disabled={pathname === "/"} onClick={() => navigate("/")}>Home</button>{" "}
<button type="button" disabled={pathname === "/about"} onClick={() => navigate("/about")}>About</button>{" "}
<button type="button" disabled={pathname === "/settings"} onClick={() => navigate("/settings")}>Settings</button>
</nav>
<main>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/settings" element={<Settings />} />
<Route path="*" element={<h1>Page not found</h1>} />
</Routes>
</main>
</>
);
}