simulation
This commit is contained in:
@@ -7,6 +7,7 @@ import Groups from "./components/Groups";
|
||||
import ThirdPlace from "./components/ThirdPlace";
|
||||
import Bracket from "./components/Bracket";
|
||||
import Fixtures from "./components/Fixtures";
|
||||
import Simulation from "./components/Simulation";
|
||||
|
||||
interface ApiData {
|
||||
updatedAt: string;
|
||||
@@ -19,7 +20,7 @@ interface ApiData {
|
||||
annexResolved: boolean;
|
||||
}
|
||||
|
||||
type Tab = "groups" | "fixtures" | "thirds" | "bracket";
|
||||
type Tab = "groups" | "fixtures" | "thirds" | "bracket" | "sim";
|
||||
|
||||
export default function Home() {
|
||||
const [data, setData] = useState<ApiData | null>(null);
|
||||
@@ -90,6 +91,9 @@ export default function Home() {
|
||||
<button className={`tab ${tab === "bracket" ? "active" : ""}`} onClick={() => setTab("bracket")}>
|
||||
K.o.-Baum
|
||||
</button>
|
||||
<button className={`tab ${tab === "sim" ? "active" : ""}`} onClick={() => setTab("sim")}>
|
||||
Simulation
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
@@ -133,6 +137,9 @@ export default function Home() {
|
||||
annexResolved={data.annexResolved}
|
||||
/>
|
||||
)}
|
||||
{data && tab === "sim" && (
|
||||
<Simulation teams={data.teams} matches={data.matches} />
|
||||
)}
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user