fix json types

This commit is contained in:
julius 2024-11-02 14:48:27 +01:00
parent 1d945977dc
commit fc073de1de
Signed by: julius
GPG Key ID: C80A63E6A5FD7092

View File

@ -1,4 +1,3 @@
import * as React from "react";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
import TableCell from "@mui/material/TableCell";
@ -8,12 +7,14 @@ import TableRow from "@mui/material/TableRow";
import Paper from "@mui/material/Paper";
import data from "./table.json";
type Row = [player: string, fulfilled: number, total: number];
export default function TeamTables() {
return (
<>
{Object.keys(data).map((teamname) => (
{Object.entries(data).map(([teamname, rows]) => (
<>
<h1>{teamname as String}</h1>
<h1>{teamname}</h1>
<TableContainer component={Paper}>
<Table
sx={{ m: "8px auto" }}
@ -27,7 +28,7 @@ export default function TeamTables() {
</TableRow>
</TableHead>
<TableBody>
{data[teamname].map((row) => (
{(rows as Row[]).map((row: Row) => (
<TableRow
key={row[0]}
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}