fix(frontend): key RemoteUserProfile and Tabs by actor/user id to reset state on navigation
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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 && (
|
||||||
|
|||||||
Reference in New Issue
Block a user