website refactor
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user