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:
30
components/layout/landing-hero-actions.tsx
Normal file
30
components/layout/landing-hero-actions.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user