fix(frontend): key RemoteUserProfile and Tabs by actor/user id to reset state on navigation

This commit is contained in:
2026-05-15 11:26:17 +02:00
parent db1625dc0d
commit 296dfdaeee
2 changed files with 2 additions and 1 deletions

View File

@@ -75,6 +75,7 @@ export default async function RemoteActorPage({
return ( return (
<RemoteUserProfile <RemoteUserProfile
key={actor.url}
actor={actor} actor={actor}
initialPosts={posts} initialPosts={posts}
me={me} me={me}

View File

@@ -265,7 +265,7 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
id="profile-card__thoughts" id="profile-card__thoughts"
className="col-span-1 lg:col-span-3 space-y-4" className="col-span-1 lg:col-span-3 space-y-4"
> >
<Tabs defaultValue="thoughts"> <Tabs key={user.id.toString()} defaultValue="thoughts">
<TabsList className="mb-4"> <TabsList className="mb-4">
<TabsTrigger value="thoughts">Thoughts</TabsTrigger> <TabsTrigger value="thoughts">Thoughts</TabsTrigger>
{isOwnProfile && ( {isOwnProfile && (