fix: improve error handling and type safety

- Replaced 'any' types with proper TypeScript types
- Improved error handling with instanceof checks
- Removed unused imports (calculateExpectedTeamScore)
- Updated error messages to be more descriptive
- Removed deprecated eslint.config.mjs file
This commit is contained in:
2026-03-29 21:20:40 -07:00
parent 576dfda619
commit c9415d490e
11 changed files with 30 additions and 54 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ interface MatchData {
table: string
}
export default function MatchEditor({ tournamentId, players, matches }: MatchEditorProps) {
export default function MatchEditor({ tournamentId, players }: MatchEditorProps) {
const [formData, setFormData] = useState<MatchData>({
team1P1Id: null,
team1P2Id: null,
@@ -120,7 +120,7 @@ export default function MatchEditor({ tournamentId, players, matches }: MatchEdi
setTimeout(() => {
window.location.reload()
}, 1000)
} catch (err) {
} catch {
setError("An error occurred. Please try again.")
setIsLoading(false)
}