Add Tournament form

This commit is contained in:
Owen Rees
2023-08-29 22:55:22 +02:00
parent 419a3dd0c0
commit d33d447f90
21 changed files with 924 additions and 110 deletions
+2 -1
View File
@@ -20,6 +20,7 @@ export interface TournamentData {
norm_tournament: boolean;
date: string;
coordinates: [number, number];
pending: boolean;
}
const tcMap: Record<TournamentData["time_control"], TimeControl> = {
@@ -110,6 +111,7 @@ const getTournaments = async () => {
timeControl,
latLng: { lat: t.coordinates[0], lng: t.coordinates[1] },
norm: t.norm_tournament,
pending: t.pending,
};
});
} catch (error) {
@@ -120,6 +122,5 @@ const getTournaments = async () => {
export default async function Tournaments() {
const tournaments = await getTournaments();
return <TournamentsDisplay tournaments={tournaments} />;
}