'use client'; import { useState } from 'react'; import { useRouter } from 'next/navigation'; import Card from '@/components/ui/Card'; import Button from '@/components/ui/Button'; import Input from '@/components/ui/Input'; import { Settings, Building2, Mail, Globe, Upload, Save, Bell, Shield, Eye, Trash2 } from 'lucide-react'; interface SponsorProfile { name: string; email: string; website: string; description: string; logoUrl: string | null; } interface NotificationSettings { emailNewSponsorships: boolean; emailWeeklyReport: boolean; emailRaceAlerts: boolean; emailPaymentAlerts: boolean; } // Mock data const MOCK_PROFILE: SponsorProfile = { name: 'Acme Racing Co.', email: 'sponsor@acme-racing.com', website: 'https://acme-racing.com', description: 'Premium sim racing equipment and accessories for competitive drivers.', logoUrl: null, }; const MOCK_NOTIFICATIONS: NotificationSettings = { emailNewSponsorships: true, emailWeeklyReport: true, emailRaceAlerts: false, emailPaymentAlerts: true, }; function Toggle({ checked, onChange, label }: { checked: boolean; onChange: (checked: boolean) => void; label: string }) { return ( ); } export default function SponsorSettingsPage() { const router = useRouter(); const [profile, setProfile] = useState(MOCK_PROFILE); const [notifications, setNotifications] = useState(MOCK_NOTIFICATIONS); const [saving, setSaving] = useState(false); const [saved, setSaved] = useState(false); const handleSaveProfile = async () => { setSaving(true); // Simulate API call await new Promise(resolve => setTimeout(resolve, 800)); setSaving(false); setSaved(true); setTimeout(() => setSaved(false), 3000); }; const handleDeleteAccount = () => { if (confirm('Are you sure you want to delete your sponsor account? This action cannot be undone.')) { // Clear demo cookies and redirect document.cookie = 'gridpilot_demo_mode=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'; document.cookie = 'gridpilot_sponsor_id=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'; router.push('/'); } }; return (
{/* Header */}

Sponsor Settings

Manage your sponsor profile and preferences

{/* Company Profile */}

Company Profile

setProfile({ ...profile, name: e.target.value })} placeholder="Your company name" />
setProfile({ ...profile, email: e.target.value })} placeholder="sponsor@company.com" />
setProfile({ ...profile, website: e.target.value })} placeholder="https://company.com" />