import { redirect } from 'next/navigation'; import { getAppMode } from '@/lib/mode'; import { getAuthService } from '@/lib/auth'; import Hero from '@/components/landing/Hero'; import AlternatingSection from '@/components/landing/AlternatingSection'; import FeatureGrid from '@/components/landing/FeatureGrid'; import DiscordCTA from '@/components/landing/DiscordCTA'; import FAQ from '@/components/landing/FAQ'; import Footer from '@/components/landing/Footer'; import CareerProgressionMockup from '@/components/mockups/CareerProgressionMockup'; import RaceHistoryMockup from '@/components/mockups/RaceHistoryMockup'; import CompanionAutomationMockup from '@/components/mockups/CompanionAutomationMockup'; import SimPlatformMockup from '@/components/mockups/SimPlatformMockup'; import MockupStack from '@/components/ui/MockupStack'; import Card from '@/components/ui/Card'; import Button from '@/components/ui/Button'; import { topLeagues, teams, getUpcomingRaces, } from '@gridpilot/testing-support'; export default async function HomePage() { const authService = getAuthService(); const session = await authService.getCurrentSession(); if (session) { redirect('/dashboard'); } const mode = getAppMode(); const isAlpha = mode === 'alpha'; const upcomingRaces = getUpcomingRaces(3); return (
{/* Section 1: A Persistent Identity */}

Your races, your seasons, your progress — finally in one place.

Lifetime stats and season history across all your leagues
Track your performance, consistency, and team contributions
Your own rating that reflects real league competition

iRacing gives you physics. GridPilot gives you a career.

} mockup={} layout="text-left" /> {/* Section 2: Results That Actually Stay */}

Every race you run stays with you.

Your stats, your team, your story — all connected
One race result updates your profile, team points, rating, and season history
No more fragmented data across spreadsheets and forums

Your racing career, finally in one place.

} mockup={} layout="text-right" /> {/* Section 3: Automatic Session Creation */}

Setting up league races used to mean clicking through iRacing's wizard 20 times.

1
Our companion app syncs with your league schedule
2
When it's race time, it creates the iRacing session automatically
3
No clicking through wizards. No manual setup

Automation instead of repetition.

} mockup={} layout="text-left" /> {/* Section 4: Game-Agnostic Platform */}

Right now, we're focused on making iRacing league racing better.

But sims come and go. Your leagues, your teams, your rating — those stay.

GridPilot is built to outlast any single platform.

When the next sim arrives, your competitive identity moves with you.

} mockup={} layout="text-right" /> {/* Alpha-only discovery section */} {isAlpha && (

Discover the grid

Explore leagues, teams, and races that make up the GridPilot ecosystem.

{/* Top leagues */}

Featured leagues

    {topLeagues.slice(0, 4).map(league => (
  • {league.name .split(' ') .map(word => word[0]) .join('') .slice(0, 3) .toUpperCase()}

    {league.name}

    {league.description}

  • ))}
{/* Teams */}

Teams on the grid

    {teams.slice(0, 4).map(team => (
  • {team.tag}

    {team.name}

    {team.description}

  • ))}
{/* Upcoming races */}

Upcoming races

{upcomingRaces.length === 0 ? (

No races scheduled in this demo snapshot.

) : (
    {upcomingRaces.map(race => (
  • {race.track}

    {race.car}

    {race.scheduledAt.toLocaleDateString(undefined, { month: 'short', day: 'numeric' })}
  • ))}
)}
)}
); }