From 317d2e0b5382fb66f25199da6dbadf674701b1aa Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 23 Oct 2025 16:13:20 +0200 Subject: [PATCH] refactor: update Bookmarks component to detect /my routes --- src/components/Bookmarks.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index f9a917eb..bb563d99 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -53,7 +53,7 @@ const Bookmarks: React.FC = ({ const showSettings = location.pathname === '/settings' const showExplore = location.pathname.startsWith('/explore') - const showMe = location.pathname.startsWith('/me') + const showMe = location.pathname.startsWith('/my') const showProfile = location.pathname.startsWith('/p/') const showSupport = location.pathname === '/support' const eventId = eventIdParam @@ -62,12 +62,12 @@ const Bookmarks: React.FC = ({ const exploreTab = location.pathname === '/explore/writings' ? 'writings' : 'highlights' // Extract tab from me routes - const meTab = location.pathname === '/me' ? 'highlights' : - location.pathname === '/me/highlights' ? 'highlights' : - location.pathname === '/me/bookmarks' ? 'bookmarks' : - location.pathname.startsWith('/me/reads') ? 'reads' : - location.pathname.startsWith('/me/links') ? 'links' : - location.pathname === '/me/writings' ? 'writings' : 'highlights' + const meTab = location.pathname === '/my' ? 'highlights' : + location.pathname === '/my/highlights' ? 'highlights' : + location.pathname === '/my/bookmarks' ? 'bookmarks' : + location.pathname.startsWith('/my/reads') ? 'reads' : + location.pathname.startsWith('/my/links') ? 'links' : + location.pathname === '/my/writings' ? 'writings' : 'highlights' // Extract tab from profile routes const profileTab = location.pathname.endsWith('/writings') ? 'writings' : 'highlights' @@ -87,7 +87,7 @@ const Bookmarks: React.FC = ({ } } - // Track previous location for going back from settings/me/explore/profile + // Track previous location for going back from settings/my/explore/profile useEffect(() => { if (!showSettings && !showMe && !showExplore && !showProfile) { previousLocationRef.current = location.pathname