fix: hide blocked user content
This commit is contained in:
@@ -51,6 +51,7 @@ export function ProfileHeader({
|
||||
relationship,
|
||||
enableActions = false,
|
||||
country,
|
||||
interactiveCounts = true,
|
||||
}: {
|
||||
avatarURL: string | null;
|
||||
name: string;
|
||||
@@ -75,6 +76,10 @@ export function ProfileHeader({
|
||||
* this header with key={handle} so the live count + relationship state
|
||||
* below re-seeds cleanly when navigating between profiles. */
|
||||
enableActions?: boolean;
|
||||
/** When false, the follower/following stats render as plain text (no
|
||||
* click target) and the follow-list drawer isn't mounted — used on a
|
||||
* blocked profile, where the lists endpoint is gated server-side. */
|
||||
interactiveCounts?: boolean;
|
||||
}) {
|
||||
// Owner affordances ride on `editHref`; the follow-action row rides on
|
||||
// `enableActions`. Mutually exclusive by construction.
|
||||
@@ -128,12 +133,20 @@ export function ProfileHeader({
|
||||
<Stat
|
||||
n={followers}
|
||||
label="followers"
|
||||
onClick={() => setFollowList("followers")}
|
||||
onClick={
|
||||
interactiveCounts
|
||||
? () => setFollowList("followers")
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
<Stat
|
||||
n={following}
|
||||
label="following"
|
||||
onClick={() => setFollowList("following")}
|
||||
onClick={
|
||||
interactiveCounts
|
||||
? () => setFollowList("following")
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
@@ -181,7 +194,7 @@ export function ProfileHeader({
|
||||
onClose={() => setZoomOpen(false)}
|
||||
/>
|
||||
) : null}
|
||||
{showCounts ? (
|
||||
{showCounts && interactiveCounts ? (
|
||||
<FollowListDrawer
|
||||
open={followList !== null}
|
||||
mode={followList ?? "followers"}
|
||||
|
||||
Reference in New Issue
Block a user