diff --git a/.eslintrc.json b/.eslintrc.json index 33cb0df..0aa6b08 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,6 +42,7 @@ ], "react/react-in-jsx-scope": "off", "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": "off", "no-use-before-define": "off", "@typescript-eslint/no-use-before-define": [ "error" diff --git a/src/pages/ClubManagement/ClubManagement.tsx b/src/pages/ClubManagement/ClubManagement.tsx index e2936fd..58ce960 100644 --- a/src/pages/ClubManagement/ClubManagement.tsx +++ b/src/pages/ClubManagement/ClubManagement.tsx @@ -168,7 +168,7 @@ export const ClubManagement = () => { /> )} { updateClub(club); diff --git a/src/pages/GameManagement/GameManagement.tsx b/src/pages/GameManagement/GameManagement.tsx index f247d91..88f25fb 100644 --- a/src/pages/GameManagement/GameManagement.tsx +++ b/src/pages/GameManagement/GameManagement.tsx @@ -321,7 +321,7 @@ export const GameManagement = () => { open={state.openEditModal} onCreate={(match: Match) => { updateMatch(match); setState({ ...state, openEditModal: false }); }} onCancel={() => setState({ ...state, openEditModal: false })} - object={state.editObject!} + object={state.editObject} type='match' action='edit' > diff --git a/src/pages/Match/Match.tsx b/src/pages/Match/Match.tsx index 8e756d3..04ab200 100644 --- a/src/pages/Match/Match.tsx +++ b/src/pages/Match/Match.tsx @@ -72,7 +72,7 @@ const _MatchContainer = (props: AbstractTeamType) => { - {match!.home!.name} + {match?.home?.name} {homeTotalPoints} {t("general.points")} { - {match!.away!.name} + {match?.away?.name} {awayTotalPoints} {t("general.points")} { keyProperty="id" textProperty="name" placeholder={"Club"} - values={clubs!} + values={clubs} /> diff --git a/src/services/weeksApi.ts b/src/services/weeksApi.ts index 5a16fc2..0231fe7 100644 --- a/src/services/weeksApi.ts +++ b/src/services/weeksApi.ts @@ -45,7 +45,7 @@ export const weeksApi = createApi({ query: () => "/deadline-info", providesTags: (res, err, arg) => res - ? [...res.weeks!.map(({ id }) => ({ type: "Week" as const, id })), "Week"] + ? [...res.weeks.map(({ id }) => ({ type: "Week" as const, id })), "Week"] : ["Week"] }),