Files
gridpilot.gg/apps/website/components/sponsors/RenewalAlert.tsx
2026-01-15 17:12:24 +01:00

36 lines
820 B
TypeScript

'use client';
import React from 'react';
import { Trophy, Users, Car, Flag, Megaphone, LucideIcon } from 'lucide-react';
import { RenewalItem } from '@/ui/RenewalItem';
interface RenewalAlertProps {
renewal: {
id: string;
type: 'league' | 'team' | 'driver' | 'race' | 'platform';
name: string;
formattedRenewDate: string;
formattedPrice: string;
};
}
export function RenewalAlert({ renewal }: RenewalAlertProps) {
const typeIcons: Record<string, LucideIcon> = {
league: Trophy,
team: Users,
driver: Car,
race: Flag,
platform: Megaphone,
};
const Icon = typeIcons[renewal.type] || Trophy;
return (
<RenewalItem
name={renewal.name}
renewDateLabel={renewal.formattedRenewDate}
priceLabel={renewal.formattedPrice}
icon={Icon}
/>
);
}