Files
HaBit/components/layout/landing-hero-actions.tsx
Harkamal Randhawa 5d80b60247 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.
2026-05-24 05:01:54 -06:00

31 lines
758 B
TypeScript

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