website cleanup
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { Protest } from "@gridpilot/racing/domain/entities/Protest";
|
||||
import { PenaltyType } from "@gridpilot/racing/domain/entities/Penalty";
|
||||
import { ProtestViewModel } from "../../lib/view-models/ProtestViewModel";
|
||||
import Modal from "../ui/Modal";
|
||||
import Button from "../ui/Button";
|
||||
import Card from "../ui/Card";
|
||||
@@ -22,8 +21,10 @@ import {
|
||||
FileWarning,
|
||||
} from "lucide-react";
|
||||
|
||||
type PenaltyType = "time_penalty" | "grid_penalty" | "points_deduction" | "disqualification" | "warning" | "license_points" | "probation" | "fine" | "race_ban";
|
||||
|
||||
interface ReviewProtestModalProps {
|
||||
protest: Protest | null;
|
||||
protest: ProtestViewModel | null;
|
||||
onClose: () => void;
|
||||
onAccept: (
|
||||
protestId: string,
|
||||
@@ -213,13 +214,13 @@ export function ReviewProtestModal({
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
<span className="text-gray-400">Filed Date</span>
|
||||
<span className="text-white font-medium">
|
||||
{new Date(protest.filedAt).toLocaleString()}
|
||||
{new Date(protest.filedAt || protest.submittedAt).toLocaleString()}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
<span className="text-gray-400">Incident Lap</span>
|
||||
<span className="text-white font-medium">
|
||||
Lap {protest.incident.lap}
|
||||
Lap {protest.incident?.lap || 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
@@ -236,7 +237,7 @@ export function ReviewProtestModal({
|
||||
Description
|
||||
</label>
|
||||
<Card className="p-4 bg-gray-800/50">
|
||||
<p className="text-gray-300">{protest.incident.description}</p>
|
||||
<p className="text-gray-300">{protest.incident?.description || protest.description}</p>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user