fix(frontend): initialize follow state from server-side following list on remote actor profile

This commit is contained in:
2026-05-15 10:54:01 +02:00
parent cf78b3e28f
commit 4b20bfd369
2 changed files with 17 additions and 4 deletions

View File

@@ -17,14 +17,16 @@ interface RemoteUserProfileProps {
actor: RemoteActor;
initialPosts: Thought[];
me: Me | null;
initialFollowed?: boolean;
}
export function RemoteUserProfile({
actor,
initialPosts,
me,
initialFollowed = false,
}: RemoteUserProfileProps) {
const [followed, setFollowed] = useState(false);
const [followed, setFollowed] = useState(initialFollowed);
const [loading, setLoading] = useState(false);
const { token } = useAuth();