import Events from "./_components/Events"; import { Stats } from "./_components/Stats"; import { Badges } from "./_components/Badges"; import { getServerSession } from "api/auth/[...nextauth]/auth"; import { EmailVerification } from "_components/EmailVerification"; import { RecentFlights } from "(app)/_components/RecentFlights"; export default async function Home({ searchParams, }: { searchParams: Promise<{ stats?: "pilot" | "dispo" }>; }) { const session = await getServerSession(); const { stats } = await searchParams; const view = stats || "pilot"; return (