Files
Dune/components/room-entry-confirmation.tsx
T
Quintine 999edb67e6 Keep room confirmations visible until acknowledged
Show confirmed create/join guidance until local Continue without polling or ordinary game actions clearing unread text. Default shared toasts to no timeout with visible Dismiss controls.

Validation: 23 focused entry/action/seat tests, types/lint/build, and original local room creation with 43-second retention through polls and a circle change, explicit dismissal and no replay. No console errors. QA room preserved. Deployed acceptance remains open. Runtime fingerprint d57fa6a34bb1738017c2690ca5ad9f04b0b99458078a60c7ddd51e2c29483301; documentation overlay a8baa23802ac1c79321d67913c27512a199699839c1932947dfa3af95434cc37.
2026-10-18 10:27:41 +11:00

22 lines
1.1 KiB
TypeScript

'use client';
import { Button } from './ui/button';
/** A local acknowledgement: polling and game actions do not dismiss this text. */
export function RoomEntryConfirmation({ kind, code, onContinue }: {
kind: 'create' | 'join';
code: string;
onContinue: () => void;
}) {
return <section className="notice min-w-0 space-y-3 break-words" style={{ fontSize: '1rem', lineHeight: 1.5 }} aria-label="Room confirmation">
<h2>{kind === 'create' ? 'Room created' : 'Room joined'}</h2>
<output className="block" aria-live="polite">
{kind === 'create'
? <>Room <strong>{code}</strong> is ready. Share the room code or invitation link from the lobby so others can join.</>
: <>You have joined room <strong>{code}</strong>. Your faction and the rules are shown at the table.</>}
</output>
<p>Use Protect your saved seat to keep a recovery kit. This message stays until you select Continue.</p>
<Button type="button" variant="outline" className="min-h-11" style={{ fontSize: '1rem' }} onClick={onContinue}>Continue</Button>
</section>;
}