From cb85768e9c0e8885e824899fa6b9957cd5225771 Mon Sep 17 00:00:00 2001 From: Nicolas Borlet <75842491+NicolasBorlet@users.noreply.github.com> Date: Fri, 21 Feb 2025 20:39:57 +0100 Subject: [PATCH] fix: click on our profile when seeing someone's profile (#7732) Co-authored-by: Stanislas Signoud Co-authored-by: Hailey --- src/view/shell/bottom-bar/BottomBarWeb.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/view/shell/bottom-bar/BottomBarWeb.tsx b/src/view/shell/bottom-bar/BottomBarWeb.tsx index da935c9fbc..8e6d90cfef 100644 --- a/src/view/shell/bottom-bar/BottomBarWeb.tsx +++ b/src/view/shell/bottom-bar/BottomBarWeb.tsx @@ -240,18 +240,28 @@ const NavItem: React.FC<{ } return getCurrentRoute(state) }) + + // Checks whether we're on someone else's profile + const isOnDifferentProfile = + currentRoute.name === 'Profile' && + routeName === 'Profile' && + (currentRoute.params as CommonNavigatorParams['Profile']).name !== + currentAccount?.handle + const isActive = currentRoute.name === 'Profile' ? isTab(currentRoute.name, routeName) && (currentRoute.params as CommonNavigatorParams['Profile']).name === - currentAccount?.handle + (routeName === 'Profile' + ? currentAccount?.handle + : (currentRoute.params as CommonNavigatorParams['Profile']).name) : isTab(currentRoute.name, routeName) return (