import { useState } from 'react' import BottomNav, { type TabId } from './components/BottomNav' import Home from './pages/Home' import Rules from './pages/Rules' import Cards from './pages/Cards' import Game from './pages/Game' import Contact from './pages/Contact' const TABS: TabId[] = ['start', 'regeln', 'karten', 'spiel', 'kontakt'] export default function App() { const [tab, setTab] = useState(() => { const p = new URLSearchParams(window.location.search).get('tab') return TABS.includes(p as TabId) ? (p as TabId) : 'start' }) return (
{tab === 'start' && setTab('spiel')} onRegeln={() => setTab('regeln')} onRedRalf={() => setTab('karten')} />} {tab === 'regeln' && } {tab === 'karten' && } {tab === 'spiel' && } {tab === 'kontakt' && }
) }