589a60ec89
- Created useBookmarks hook for NIP-51 kind 10003 bookmark list management (query, add, remove bookmarks) - Created BookmarksPage with login prompt, loading skeletons, and empty state - Replaced "More" nav item with "Bookmarks" in LeftSidebar - Added bookmark toggle button to NoteCard action bar (replaces three-dot menu) - Removed /more route from AppRouter - Bookmarks are stored per NIP-51 as replaceable kind 10003 events Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
42 lines
1.9 KiB
TypeScript
42 lines
1.9 KiB
TypeScript
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
|
import { ScrollToTop } from "./components/ScrollToTop";
|
|
|
|
import Index from "./pages/Index";
|
|
import { NIP19Page } from "./pages/NIP19Page";
|
|
import { ProfilePage } from "./pages/ProfilePage";
|
|
import { NotificationsPage } from "./pages/NotificationsPage";
|
|
import { SearchPage } from "./pages/SearchPage";
|
|
import { SettingsPage } from "./pages/SettingsPage";
|
|
import { HashtagPage } from "./pages/HashtagPage";
|
|
import { BookmarksPage } from "./pages/BookmarksPage";
|
|
import { PlaceholderPage } from "./pages/PlaceholderPage";
|
|
import NotFound from "./pages/NotFound";
|
|
|
|
export function AppRouter() {
|
|
return (
|
|
<BrowserRouter>
|
|
<ScrollToTop />
|
|
<Routes>
|
|
<Route path="/" element={<Index />} />
|
|
<Route path="/notifications" element={<NotificationsPage />} />
|
|
<Route path="/search" element={<SearchPage />} />
|
|
<Route path="/profile" element={<ProfilePage />} />
|
|
<Route path="/u/:npub" element={<ProfilePage />} />
|
|
<Route path="/t/:tag" element={<HashtagPage />} />
|
|
<Route path="/settings" element={<SettingsPage />} />
|
|
<Route path="/settings/:section" element={<SettingsPage />} />
|
|
<Route path="/vines" element={<PlaceholderPage title="Vines" />} />
|
|
<Route path="/wallet" element={<PlaceholderPage title="Wallet" />} />
|
|
<Route path="/bookmarks" element={<BookmarksPage />} />
|
|
<Route path="/mutes" element={<PlaceholderPage title="Mutes" />} />
|
|
<Route path="/domain-blocks" element={<PlaceholderPage title="Domain blocks" />} />
|
|
{/* NIP-19 route for npub1, note1, naddr1, nevent1, nprofile1 */}
|
|
<Route path="/:nip19" element={<NIP19Page />} />
|
|
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
|
|
<Route path="*" element={<NotFound />} />
|
|
</Routes>
|
|
</BrowserRouter>
|
|
);
|
|
}
|
|
export default AppRouter;
|