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
+30
View File
@@ -1,4 +1,5 @@
import { LatLngLiteral } from "leaflet";
import { Dispatch, MutableRefObject, SetStateAction } from "react";
export enum TimeControl {
Classic = "Classic",
@@ -18,6 +19,35 @@ export interface Tournament {
date: string;
latLng: LatLngLiteral;
norm: boolean;
pending: boolean;
}
export interface MapProps {
position: LatLngLiteral;
setPosition: Dispatch<SetStateAction<LatLngLiteral>>;
center: LatLngLiteral;
}
export interface TournamentFormProps {
addressRef: MutableRefObject<HTMLInputElement | null>;
townRef: MutableRefObject<HTMLInputElement | null>;
departmentRef: MutableRefObject<HTMLInputElement | null>;
tournamentNameRef: MutableRefObject<HTMLInputElement | null>;
urlRef: MutableRefObject<HTMLInputElement | null>;
timeControlRef: MutableRefObject<HTMLSelectElement | null>;
dateRef: MutableRefObject<HTMLInputElement | null>;
countryRef: MutableRefObject<HTMLInputElement | null>;
normRef: MutableRefObject<HTMLSelectElement | null>;
yourNameRef: MutableRefObject<HTMLInputElement | null>;
yourEmailRef: MutableRefObject<HTMLInputElement | null>;
messageRef: MutableRefObject<HTMLTextAreaElement | null>;
position: LatLngLiteral;
setPosition: Dispatch<SetStateAction<LatLngLiteral>>;
}
export interface ResponseMessage {
isSuccessful: boolean;
message: string;
}
export type ScrollableElement = Window | HTMLElement;