From 2c2353438ec7038283a55540376833ebea36e055 Mon Sep 17 00:00:00 2001 From: CodeZera11 Date: Tue, 10 Oct 2023 19:10:47 +0530 Subject: [PATCH] fix: login button showing after succesfull login --- app/(marketing)/layout.tsx | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx index 902099c..071e549 100644 --- a/app/(marketing)/layout.tsx +++ b/app/(marketing)/layout.tsx @@ -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,27 @@ interface MarketingLayoutProps { export default async function MarketingLayout({ children, }: MarketingLayoutProps) { + + const user = await getCurrentUser() + return (
- + {!user && + + }
{children}