// Undercooked — the connecting screen (phase 07 task 02). // // The brief in-between: a room is being created (or a code is being // joined) and the `welcome` has not landed yet. *Cancel* is a clean // close of the socket — the room, once created, lives on server-side // (the 30 s seat grace / the GC decide its fate), so cancelling never // deletes anything. import { el } from "./dom.js"; export function mount(target, data, app) { const text = data.what === "creating" ? "Creating your kitchen…" : `Connecting to ${data.code ?? "…"}…`; target.append( el("div", { class: "panel connecting" }, el("h2", {}, "Connecting"), el("p", { id: "connecting-text" }, text), el("button", { id: "cancel-connect", class: "btn", type: "button", onClick: () => app.backToLanding(), }, "Cancel"), ), ); } export function unmount() { /* static */ }