From 0b1cf267a77f2690170c36761c4ef48b1fd04eca Mon Sep 17 00:00:00 2001 From: Gigi Date: Tue, 14 Oct 2025 11:08:42 +0200 Subject: [PATCH] refactor: reorder explore tabs - highlights first, writings second - Change default tab to highlights on /explore - Reorder tab buttons in UI (highlights, then writings) - Update route: /explore shows highlights, /explore/writings shows writings - Update route detection logic in Bookmarks component - Highlights are now the primary content on explore page --- src/App.tsx | 2 +- src/components/Bookmarks.tsx | 2 +- src/components/Explore.tsx | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3b0a8575..ed2c139d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -71,7 +71,7 @@ function AppRoutes({ } /> = ({ relayPool, onLogout }) => { const showProfile = location.pathname.startsWith('/p/') // Extract tab from explore routes - const exploreTab = location.pathname === '/explore/highlights' ? 'highlights' : 'writings' + const exploreTab = location.pathname === '/explore/writings' ? 'writings' : 'highlights' // Extract tab from me routes const meTab = location.pathname === '/me' ? 'highlights' : diff --git a/src/components/Explore.tsx b/src/components/Explore.tsx index 10283919..934d417e 100644 --- a/src/components/Explore.tsx +++ b/src/components/Explore.tsx @@ -25,7 +25,7 @@ type TabType = 'writings' | 'highlights' const Explore: React.FC = ({ relayPool, activeTab: propActiveTab }) => { const activeAccount = Hooks.useActiveAccount() const navigate = useNavigate() - const [activeTab, setActiveTab] = useState(propActiveTab || 'writings') + const [activeTab, setActiveTab] = useState(propActiveTab || 'highlights') const [blogPosts, setBlogPosts] = useState([]) const [highlights, setHighlights] = useState([]) const [loading, setLoading] = useState(true) @@ -293,22 +293,22 @@ const Explore: React.FC = ({ relayPool, activeTab: propActiveTab } )}
- +