import type { DashboardViewData } from '@/lib/view-data/DashboardViewData'; interface DashboardTemplateProps { viewData: DashboardViewData; } export function DashboardTemplate({ viewData }: DashboardTemplateProps) { const { currentDriver, nextRace, upcomingRaces, leagueStandings, feedItems, friends, activeLeaguesCount, friendCount, hasUpcomingRaces, hasLeagueStandings, hasFeedItems, hasFriends, } = viewData; return (
{/* Hero Section */}
{/* Background Pattern */}
{/* Welcome Message */}
{currentDriver.name}

Good morning,

{currentDriver.name} {currentDriver.country}

{currentDriver.rating}
#{currentDriver.rank}
{currentDriver.totalRaces} races completed
{/* Quick Actions */}
{/* Quick Stats Row */}
Trophy

{currentDriver.wins}

Wins

Medal

{currentDriver.podiums}

Podiums

Target

{currentDriver.consistency}

Consistency

Users

{activeLeaguesCount}

Active Leagues

{/* Main Content */}
{/* Left Column - Main Content */}
{/* Next Race Card */} {nextRace && (
Next Race
{nextRace.isMyLeague && ( Your League )}

{nextRace.track}

{nextRace.car}

Calendar {nextRace.formattedDate} Clock {nextRace.formattedTime}

Starts in

{nextRace.timeUntil}

View Details ChevronRight
)} {/* League Standings Preview */} {hasLeagueStandings && (

Award Your Championship Standings

View all ChevronRight
{leagueStandings.map((summary) => (

{summary.leagueName}

Position {summary.position} • {summary.points} points

{summary.totalDrivers} drivers
))}
)} {/* Activity Feed */}

Activity Recent Activity

{hasFeedItems ? (
{feedItems.slice(0, 5).map((item) => (

{item.headline}

{item.body &&

{item.body}

}

{item.formattedTime}

{item.ctaHref && item.ctaLabel && ( {item.ctaLabel} )}
))}
) : (
Activity

No activity yet

Join leagues and add friends to see activity here

)}
{/* Right Column - Sidebar */}
{/* Upcoming Races */}

Calendar Upcoming Races

View all
{hasUpcomingRaces ? (
{upcomingRaces.slice(0, 5).map((race) => (

{race.track}

{race.car}

{race.formattedDate} {race.formattedTime}
{race.isMyLeague && ( Your League )}
))}
) : (

No upcoming races

)}
{/* Friends */}

Users Friends

{friends.length} friends
{hasFriends ? (
{friends.slice(0, 6).map((friend) => (
{friend.name}

{friend.name}

{friend.country}

))} {friends.length > 6 && ( +{friends.length - 6} more )}
) : (
UserPlus

No friends yet

Find Drivers
)}
); }