diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index e170da61..1c2efa13 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -328,7 +328,7 @@ const Bookmarks: React.FC = ({ relayPool ? : null ) : undefined} me={showMe ? ( - relayPool ? : null + relayPool ? : null ) : undefined} profile={showProfile && profilePubkey ? ( relayPool ? : null diff --git a/src/components/Me.tsx b/src/components/Me.tsx index c7e6849a..69f9d060 100644 --- a/src/components/Me.tsx +++ b/src/components/Me.tsx @@ -57,7 +57,7 @@ const Me: React.FC = ({ const activeAccount = Hooks.useActiveAccount() const navigate = useNavigate() const { filter: urlFilter } = useParams<{ filter?: string }>() - const activeTab: TabType = propActiveTab || 'highlights' + const [activeTab, setActiveTab] = useState(propActiveTab || 'highlights') // Only for own profile const viewingPubkey = activeAccount?.pubkey @@ -129,7 +129,12 @@ const Me: React.FC = ({ } }, []) - // activeTab is derived from route prop; no local sync needed + // Sync activeTab from prop when route changes + useEffect(() => { + if (propActiveTab) { + setActiveTab(propActiveTab) + } + }, [propActiveTab]) // Sync filter state with URL changes useEffect(() => { @@ -891,7 +896,7 @@ const Me: React.FC = ({ -
+
{renderTabContent()}