Merge remote-tracking branch 'ericpp/fix-viewer-count'
This commit is contained in:
@ -45,7 +45,7 @@ export function StreamInfo({ ev, goal }: { ev?: TaggedNostrEvent; goal?: TaggedN
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!streamContext.showDetails) return;
|
if (!streamContext.showDetails) return;
|
||||||
const viewers = Number(participants ?? "0");
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex gap-2 max-xl:flex-col">
|
<div className="flex gap-2 max-xl:flex-col">
|
||||||
@ -55,11 +55,13 @@ export function StreamInfo({ ev, goal }: { ev?: TaggedNostrEvent; goal?: TaggedN
|
|||||||
<div className="flex gap-4 items-center flex-wrap">
|
<div className="flex gap-4 items-center flex-wrap">
|
||||||
<Profile pubkey={host ?? ""} avatarSize={40} />
|
<Profile pubkey={host ?? ""} avatarSize={40} />
|
||||||
<FollowButton pubkey={host} hideWhenFollowing={true} />
|
<FollowButton pubkey={host} hideWhenFollowing={true} />
|
||||||
<div className="flex grow justify-end xl:hidden text-nowrap">
|
{participants !== undefined && (
|
||||||
<Pill>
|
<div className="flex grow justify-end xl:hidden text-nowrap">
|
||||||
<FormattedMessage defaultMessage="{n} viewers" values={{ n: formatSats(viewers) }} />
|
<Pill>
|
||||||
</Pill>
|
<FormattedMessage defaultMessage="{n} viewers" values={{ n: formatSats(Number(participants)) }} />
|
||||||
</div>
|
</Pill>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{ev && (
|
{ev && (
|
||||||
@ -81,9 +83,11 @@ export function StreamInfo({ ev, goal }: { ev?: TaggedNostrEvent; goal?: TaggedN
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2 flex-wrap max-xl:hidden">
|
<div className="flex gap-2 flex-wrap max-xl:hidden">
|
||||||
<StatePill state={status as StreamState} />
|
<StatePill state={status as StreamState} />
|
||||||
<Pill>
|
{participants !== undefined && (
|
||||||
<FormattedMessage defaultMessage="{n} viewers" values={{ n: formatSats(viewers) }} />
|
<Pill>
|
||||||
</Pill>
|
<FormattedMessage defaultMessage="{n} viewers" values={{ n: formatSats(Number(participants)) }} />
|
||||||
|
</Pill>
|
||||||
|
)}
|
||||||
{status === StreamState.Live && (
|
{status === StreamState.Live && (
|
||||||
<Pill>
|
<Pill>
|
||||||
<StreamTimer ev={ev} />
|
<StreamTimer ev={ev} />
|
||||||
|
Reference in New Issue
Block a user