This commit is contained in:
Shivam Kumar 2026-04-20 15:37:07 +00:00 committed by GitHub
commit c2534e9fd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@ import { cn } from "@/lib/utils"
import { buttonVariants } from "@/components/ui/button"
import { MainNav } from "@/components/main-nav"
import { SiteFooter } from "@/components/site-footer"
import { getCurrentUser } from "@/lib/session"
interface MarketingLayoutProps {
children: React.ReactNode
@ -13,22 +14,23 @@ interface MarketingLayoutProps {
export default async function MarketingLayout({
children,
}: MarketingLayoutProps) {
const user = await getCurrentUser();
return (
<div className="flex min-h-screen flex-col">
<header className="container z-40 bg-background">
<div className="flex h-20 items-center justify-between py-6">
<MainNav items={marketingConfig.mainNav} />
<nav>
{ (!user) ? <nav>
<Link
href="/login"
className={cn(
buttonVariants({ variant: "secondary", size: "sm" }),
"px-4"
)}
)}
>
Login
</Link>
</nav>
</nav> : null }
</div>
</header>
<main className="flex-1">{children}</main>