- multiplayer.tsx: layout route wrapping all multiplayer children
with WsProvider, auth guard via beforeLoad
- multiplayer/index.tsx: create/join landing page
- POST /api/v1/lobbies to create, navigates to lobby waiting room
- POST /api/v1/lobbies/:code/join to join, normalizes code to
uppercase before sending
- loading states per action, error display, Enter key on join input
- imports Lobby type from @lila/shared (single source of truth)
9 lines
242 B
TypeScript
9 lines
242 B
TypeScript
import { createFileRoute } from '@tanstack/react-router'
|
|
|
|
export const Route = createFileRoute('/multiplayer/lobby/$code')({
|
|
component: RouteComponent,
|
|
})
|
|
|
|
function RouteComponent() {
|
|
return <div>Hello "/multiplayer/lobby/$code"!</div>
|
|
}
|