From fc073de1de7140423a81db8b3aaf71d9f3905188 Mon Sep 17 00:00:00 2001 From: julius Date: Sat, 2 Nov 2024 14:48:27 +0100 Subject: [PATCH] fix json types --- prefs_page/src/Table.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/prefs_page/src/Table.tsx b/prefs_page/src/Table.tsx index 0b40054..ea34689 100644 --- a/prefs_page/src/Table.tsx +++ b/prefs_page/src/Table.tsx @@ -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]) => ( <> -

{teamname as String}

+

{teamname}

- {data[teamname].map((row) => ( + {(rows as Row[]).map((row: Row) => (