Skip to content

Commit 07842bd

Browse files
committed
add note sync across relays feature
1 parent 3229a67 commit 07842bd

3 files changed

Lines changed: 392 additions & 3 deletions

File tree

src/AppRouter.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ScrollToTop } from "./components/ScrollToTop";
44
import Index from "./pages/Index";
55
import SearchPage from "./pages/SearchPage";
66
import CreatePage from "./pages/CreatePage";
7+
import SyncPage from "./pages/SyncPage";
78
import { NIP19Page } from "./pages/NIP19Page";
89
import NotFound from "./pages/NotFound";
910

@@ -15,6 +16,7 @@ export function AppRouter() {
1516
<Route path="/" element={<Index />} />
1617
<Route path="/search" element={<SearchPage />} />
1718
<Route path="/create" element={<CreatePage />} />
19+
<Route path="/sync" element={<SyncPage />} />
1820
{/* NIP-19 route for npub1, note1, naddr1, nevent1, nprofile1 */}
1921
<Route path="/:nip19" element={<NIP19Page />} />
2022
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}

src/components/Navigation.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Link, useLocation } from 'react-router-dom';
2-
import { Search, Plus } from 'lucide-react';
2+
import { Search, Plus, RefreshCw } from 'lucide-react';
33
import { LoginArea } from '@/components/auth/LoginArea';
44
import { cn } from '@/lib/utils';
55

@@ -13,6 +13,12 @@ export function Navigation() {
1313
icon: Search,
1414
description: 'Browse and search events'
1515
},
16+
{
17+
path: '/sync',
18+
label: 'Sync',
19+
icon: RefreshCw,
20+
description: 'Sync notes between relays'
21+
},
1622
{
1723
path: '/create',
1824
label: 'Create',
@@ -40,7 +46,7 @@ export function Navigation() {
4046
{navItems.map((item) => {
4147
const Icon = item.icon;
4248
const isActive = location.pathname === item.path;
43-
49+
4450
return (
4551
<Link
4652
key={item.path}
@@ -72,7 +78,7 @@ export function Navigation() {
7278
{navItems.map((item) => {
7379
const Icon = item.icon;
7480
const isActive = location.pathname === item.path;
75-
81+
7682
return (
7783
<Link
7884
key={item.path}

0 commit comments

Comments
 (0)