website cleanup

This commit is contained in:
2025-12-24 21:44:58 +01:00
parent 9b683a59d3
commit d78854a4c6
277 changed files with 6141 additions and 2693 deletions

View File

@@ -1,11 +1,19 @@
import Card from '@/components/ui/Card';
import type { LeagueScoringChampionshipDTO } from '@core/racing/application/dto/LeagueScoringConfigDTO';
import type { LeagueScoringChampionshipDTO } from '@/lib/types/generated/LeagueScoringChampionshipDTO';
type PointsPreviewRow = {
sessionType: string;
position: number;
points: number;
};
interface ChampionshipCardProps {
championship: LeagueScoringChampionshipDTO;
}
export function ChampionshipCard({ championship }: ChampionshipCardProps) {
const pointsPreview = (championship.pointsPreview as unknown as PointsPreviewRow[]) ?? [];
const dropPolicyDescription = (championship as unknown as { dropPolicyDescription?: string }).dropPolicyDescription ?? '';
const getTypeLabel = (type: string): string => {
switch (type) {
case 'driver':
@@ -66,12 +74,12 @@ export function ChampionshipCard({ championship }: ChampionshipCardProps) {
)}
{/* Points Preview */}
{championship.pointsPreview.length > 0 && (
{pointsPreview.length > 0 && (
<div>
<h4 className="text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Points Distribution</h4>
<div className="bg-deep-graphite rounded-lg border border-charcoal-outline p-4">
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-3">
{championship.pointsPreview.slice(0, 6).map((preview, idx) => (
{pointsPreview.slice(0, 6).map((preview, idx) => (
<div key={idx} className="text-center">
<div className="text-xs text-gray-500 mb-1">P{preview.position}</div>
<div className="text-lg font-bold text-white tabular-nums">{preview.points}</div>
@@ -87,9 +95,9 @@ export function ChampionshipCard({ championship }: ChampionshipCardProps) {
<div className="flex items-center gap-2 mb-2">
<span className="text-xs font-medium text-gray-500 uppercase tracking-wider">Drop Policy</span>
</div>
<p className="text-sm text-gray-300">{championship.dropPolicyDescription}</p>
<p className="text-sm text-gray-300">{dropPolicyDescription}</p>
</div>
</div>
</Card>
);
}
}