Keep landing page public for signed-in users.

Remove the home-page auto-redirect so `/` stays a marketing page while app entry and onboarding gates remain unchanged.
This commit is contained in:
2026-05-24 05:01:54 -06:00
parent ac0b102e78
commit 5d80b60247
3 changed files with 34 additions and 29 deletions

View File

@@ -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 (
<div className="flex flex-wrap gap-3">
<Button asChild size="lg">
<Link href={routes.avatar}>Go to your pet</Link>
</Button>
</div>
);
}
return (
<div className="flex flex-wrap gap-3">
<Button asChild size="lg">
<Link href={routes.signUp}>Get started</Link>
</Button>
<Button asChild size="lg" variant="outline">
<Link href={routes.login}>Sign in</Link>
</Button>
</div>
);
}

View File

@@ -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;
}