Fix som Bugs #33
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
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({
|
||||
@@ -10,12 +8,10 @@ export default async function Home({
|
||||
}: {
|
||||
searchParams: Promise<{ stats?: "pilot" | "dispo" }>;
|
||||
}) {
|
||||
const session = await getServerSession();
|
||||
const { stats } = await searchParams;
|
||||
const view = stats || "pilot";
|
||||
return (
|
||||
<div>
|
||||
{!session?.user.emailVerified && <EmailVerification />}
|
||||
<Stats stats={view} />
|
||||
<div className="grid grid-cols-6 gap-4">
|
||||
<div className="card bg-base-200 shadow-xl mb-4 col-span-6 xl:col-span-3">
|
||||
|
||||
Reference in New Issue
Block a user