fix(me): add key to tab content div to force re-render on tab switch

This commit is contained in:
Gigi
2025-10-21 22:59:09 +02:00
parent 6522a2871c
commit f9dda1c5d4
2 changed files with 2 additions and 2 deletions

View File

@@ -328,7 +328,7 @@ const Bookmarks: React.FC<BookmarksProps> = ({
relayPool ? <Explore relayPool={relayPool} eventStore={eventStore} settings={settings} activeTab={exploreTab} /> : null
) : undefined}
me={showMe ? (
relayPool ? <Me relayPool={relayPool} eventStore={eventStore} activeTab={meTab} bookmarks={bookmarks} bookmarksLoading={bookmarksLoading} settings={settings} /> : null
relayPool ? <Me key={meTab} relayPool={relayPool} eventStore={eventStore} activeTab={meTab} bookmarks={bookmarks} bookmarksLoading={bookmarksLoading} settings={settings} /> : null
) : undefined}
profile={showProfile && profilePubkey ? (
relayPool ? <Profile relayPool={relayPool} eventStore={eventStore} pubkey={profilePubkey} activeTab={profileTab} /> : null

View File

@@ -891,7 +891,7 @@ const Me: React.FC<MeProps> = ({
</div>
</div>
<div className="me-tab-content">
<div className="me-tab-content" key={activeTab}>
{renderTabContent()}
</div>
</div>