Skip to content

Commit 0918b1c

Browse files
committed
feat(events): show full-capacity badge near participant avatars
1 parent 8f40b62 commit 0918b1c

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

‎apps/web/src/modules/public/events/detail/EventDetailsClient.tsx‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,22 @@ export function EventDetailsClient({
379379
</div>
380380
) : null}
381381
<div className="hidden text-right sm:block">
382-
<div className="text-xs font-bold text-foreground">
383-
{participantCount} 人已报名
382+
<div className="flex items-center justify-end gap-2 text-xs font-bold text-foreground">
383+
<span>{participantCount} 人已报名</span>
384+
{remainingSeats === 0 ? (
385+
<Badge
386+
variant="destructive"
387+
className="h-5 px-1.5 text-[10px]"
388+
>
389+
名额已满
390+
</Badge>
391+
) : null}
384392
</div>
385393
{remainingSeats !== null ? (
386394
<div className="text-[10px] text-muted-foreground">
387-
剩余 {remainingSeats} 个名额
395+
{remainingSeats === 0
396+
? "当前无剩余名额"
397+
: `剩余 ${remainingSeats} 个名额`}
388398
</div>
389399
) : null}
390400
</div>

0 commit comments

Comments
 (0)