website refactor

This commit is contained in:
2026-01-12 01:01:49 +01:00
parent 5ca6023a5a
commit fefd8d1cd6
294 changed files with 4628 additions and 4991 deletions

View File

@@ -3,7 +3,7 @@
import React, { useState } from 'react';
import { useRouter } from 'next/navigation';
import Button from '@/components/ui/Button';
import { usePenaltyMutation } from '@/hooks/league/usePenaltyMutation';
import { usePenaltyMutation } from "@/lib/hooks/league/usePenaltyMutation";
import { AlertTriangle, Clock, Flag, Zap } from 'lucide-react';
interface DriverOption {
@@ -52,16 +52,14 @@ export default function QuickPenaltyModal({ raceId, drivers, onClose, preSelecte
setError(null);
try {
const command: any = {
const command = {
raceId: selectedRaceId,
driverId: selectedDriver,
adminId,
infractionType: infractionType as any,
severity: severity as any,
stewardId: adminId,
type: infractionType,
reason: severity,
notes: notes.trim() || undefined,
};
if (notes.trim()) {
command.notes = notes.trim();
}
await penaltyMutation.mutateAsync(command);