Write on the margins of the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
at v0.1.10 53 lines 1.9 kB view raw
1import { Routes, Route } from "react-router-dom"; 2import { AuthProvider } from "./context/AuthContext"; 3import Navbar from "./components/Navbar"; 4import Feed from "./pages/Feed"; 5import Url from "./pages/Url"; 6import Profile from "./pages/Profile"; 7import Login from "./pages/Login"; 8import New from "./pages/New"; 9import Bookmarks from "./pages/Bookmarks"; 10import Highlights from "./pages/Highlights"; 11import Notifications from "./pages/Notifications"; 12import AnnotationDetail from "./pages/AnnotationDetail"; 13import Collections from "./pages/Collections"; 14import CollectionDetail from "./pages/CollectionDetail"; 15import Privacy from "./pages/Privacy"; 16 17function AppContent() { 18 return ( 19 <div className="app"> 20 <Navbar /> 21 <main className="main-content"> 22 <Routes> 23 <Route path="/" element={<Feed />} /> 24 <Route path="/url" element={<Url />} /> 25 <Route path="/new" element={<New />} /> 26 <Route path="/bookmarks" element={<Bookmarks />} /> 27 <Route path="/highlights" element={<Highlights />} /> 28 <Route path="/notifications" element={<Notifications />} /> 29 <Route path="/profile/:handle" element={<Profile />} /> 30 <Route path="/login" element={<Login />} /> 31 {} 32 <Route path="/at/:did/:rkey" element={<AnnotationDetail />} /> 33 {} 34 <Route path="/annotation/:uri" element={<AnnotationDetail />} /> 35 <Route path="/collections" element={<Collections />} /> 36 <Route path="/collections/:rkey" element={<CollectionDetail />} /> 37 <Route path="/collection/*" element={<CollectionDetail />} /> 38 <Route path="/privacy" element={<Privacy />} /> 39 </Routes> 40 </main> 41 </div> 42 ); 43} 44 45export default function App() { 46 return ( 47 <AuthProvider> 48 <Routes> 49 <Route path="/*" element={<AppContent />} /> 50 </Routes> 51 </AuthProvider> 52 ); 53}