use ACT_LABELS from shared constants in room header

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 17:41:49 +01:00
parent c49b41c64e
commit 42f032f67c

View File

@@ -1,4 +1,5 @@
import { Badge } from "@/components/ui/badge"
import { ACT_LABELS } from "@celebrate-esc/shared"
import type { Act } from "@celebrate-esc/shared"
interface RoomHeaderProps {
@@ -7,20 +8,12 @@ interface RoomHeaderProps {
connectionStatus: "disconnected" | "connecting" | "connected"
}
const actLabels: Record<Act, string> = {
lobby: "Lobby",
act1: "Act 1",
act2: "Act 2",
act3: "Act 3",
ended: "Ended",
}
export function RoomHeader({ roomCode, currentAct, connectionStatus }: RoomHeaderProps) {
return (
<div className="flex items-center justify-between border-b p-4">
<div className="flex items-center gap-3">
<span className="font-mono text-2xl font-bold tracking-widest">{roomCode}</span>
<Badge variant="outline">{actLabels[currentAct]}</Badge>
<Badge variant="outline">{ACT_LABELS[currentAct]}</Badge>
</div>
<span
className={`h-2 w-2 rounded-full ${