diff --git a/app/page.tsx b/app/page.tsx index ceea821..3db636d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,10 +1,8 @@ -import Link from "next/link"; import { Suspense } from "react"; import { PixelAvatar } from "@/components/avatar/pixel-avatar"; -import { LoggedInRedirect } from "@/components/layout/logged-in-redirect"; +import { LandingHeroActions } from "@/components/layout/landing-hero-actions"; import { SiteFooter, SiteHeader } from "@/components/layout/site-header"; -import { Button } from "@/components/ui/button"; import { Card, CardContent, @@ -12,15 +10,10 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; -import { routes } from "@/lib/routes"; export default function Home() { return (
- - - -
@@ -37,14 +30,9 @@ export default function Home() { into a simple game. Keep streaks alive, take your once-per-day quiz, and watch your pet change with you.

-
- - -
+ + +
diff --git a/components/layout/landing-hero-actions.tsx b/components/layout/landing-hero-actions.tsx new file mode 100644 index 0000000..61bf497 --- /dev/null +++ b/components/layout/landing-hero-actions.tsx @@ -0,0 +1,30 @@ +import Link from "next/link"; + +import { Button } from "@/components/ui/button"; +import { getSessionUser } from "@/lib/auth-helpers"; +import { routes } from "@/lib/routes"; + +export async function LandingHeroActions() { + const user = await getSessionUser(); + + if (user) { + return ( +
+ +
+ ); + } + + return ( +
+ + +
+ ); +} diff --git a/components/layout/logged-in-redirect.tsx b/components/layout/logged-in-redirect.tsx deleted file mode 100644 index ca07c5f..0000000 --- a/components/layout/logged-in-redirect.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { redirect } from "next/navigation"; - -import { getOnboardingRedirectPath, getSessionUser } from "@/lib/auth-helpers"; - -export async function LoggedInRedirect() { - const user = await getSessionUser(); - - if (user) { - redirect(await getOnboardingRedirectPath()); - } - - return null; -}