'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 (
Manage your sponsor profile and preferences
PNG, JPEG, or SVG. Max 2MB.
Public Profile
Allow leagues to see your sponsor profile
Show Sponsorship Stats
Display your total sponsorships and investment on profile
Change Password
Update your account password
Two-Factor Authentication
Add an extra layer of security
Delete Sponsor Account
Permanently delete your account and all sponsorship data
Alpha Note: Settings are demonstration-only and won't persist. Full account management will be available when the system is fully implemented.