website cleanup
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
'use client';
|
||||
|
||||
import type { LeagueScoringConfigDTO } from '@/lib/types/generated/LeagueScoringConfigDTO';
|
||||
import type { LeagueScoringConfigViewModel } from '@/lib/view-models/LeagueScoringConfigViewModel';
|
||||
import { Trophy, Clock, Target, Zap, Info } from 'lucide-react';
|
||||
|
||||
type LeagueScoringConfigUi = LeagueScoringConfigDTO & {
|
||||
type LeagueScoringConfigUi = LeagueScoringConfigViewModel & {
|
||||
scoringPresetName?: string;
|
||||
dropPolicySummary?: string;
|
||||
championships?: Array<{
|
||||
@@ -18,7 +18,7 @@ type LeagueScoringConfigUi = LeagueScoringConfigDTO & {
|
||||
};
|
||||
|
||||
interface LeagueScoringTabProps {
|
||||
scoringConfig: LeagueScoringConfigDTO | null;
|
||||
scoringConfig: LeagueScoringConfigViewModel | null;
|
||||
practiceMinutes?: number;
|
||||
qualifyingMinutes?: number;
|
||||
sprintRaceMinutes?: number;
|
||||
@@ -178,22 +178,25 @@ export default function LeagueScoringTab({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{championship.pointsPreview.map((row, index: number) => (
|
||||
<tr
|
||||
key={`${row.sessionType}-${row.position}-${index}`}
|
||||
className="border-b border-charcoal-outline/30"
|
||||
>
|
||||
<td className="py-1.5 pr-2 text-gray-200">
|
||||
{row.sessionType}
|
||||
</td>
|
||||
<td className="py-1.5 px-2 text-gray-200">
|
||||
P{row.position}
|
||||
</td>
|
||||
<td className="py-1.5 px-2 text-white">
|
||||
{row.points}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{championship.pointsPreview.map((row, index: number) => {
|
||||
const typedRow = row as { sessionType: string; position: number; points: number };
|
||||
return (
|
||||
<tr
|
||||
key={`${typedRow.sessionType}-${typedRow.position}-${index}`}
|
||||
className="border-b border-charcoal-outline/30"
|
||||
>
|
||||
<td className="py-1.5 pr-2 text-gray-200">
|
||||
{typedRow.sessionType}
|
||||
</td>
|
||||
<td className="py-1.5 px-2 text-gray-200">
|
||||
P{typedRow.position}
|
||||
</td>
|
||||
<td className="py-1.5 px-2 text-white">
|
||||
{typedRow.points}
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -231,4 +234,4 @@ export default function LeagueScoringTab({
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user