import { Route, Switch } from "wouter"
import { HomePage } from "@/pages/home"
import { RoomPage } from "@/pages/room"

export function App() {
  return (
    <Switch>
      <Route path="/" component={HomePage} />
      <Route path="/room/:code">
        {(params) => <RoomPage code={params.code.toUpperCase()} />}
      </Route>
      <Route>
        <div className="flex min-h-svh items-center justify-center p-6">
          <p className="text-muted-foreground text-sm">Page introuvable.</p>
        </div>
      </Route>
    </Switch>
  )
}
