five-on-it / apps/client/src/ui/kit/PageHeader
apps/client/src/ui/kit/PageHeader
The header of every game page (BrowsePage.tsx): the brand, which leads to the main menu; Back, to the page's logical parent (its Trail, nav.ts: never the browser's history, so a page opened from a shared link still has its way home); the breadcrumbs from the main menu down to the page; and what stands at its right (the account bar). Esc goes back too, as it does in the main menu, unless something on the page has it: a field being typed in, an open dialog or menu, or the studio (its trail's escape). A page tells it what it learned (a game's title, a lobby's game) with useTrailKnown. Its ids: #page-header, #page-brand, #page-crumbs, and the Back's own (#game-back, #lobby-back…), the end-to-end tests' contract.