From ee5043b59172558198cff339ca90da7e2ab65034 Mon Sep 17 00:00:00 2001 From: akshaybandi271 Date: Tue, 30 May 2023 22:11:38 +0530 Subject: [PATCH] FIX #95 login button in initial page --- app/(marketing)/layout.tsx | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx index 902099c..ea834f4 100644 --- a/app/(marketing)/layout.tsx +++ b/app/(marketing)/layout.tsx @@ -1,10 +1,13 @@ import Link from "next/link" +import { getServerSession } from "next-auth/next" import { marketingConfig } from "@/config/marketing" +import { authOptions } from "@/lib/auth" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" import { MainNav } from "@/components/main-nav" import { SiteFooter } from "@/components/site-footer" +import { UserAccountNav } from "@/components/user-account-nav" interface MarketingLayoutProps { children: React.ReactNode @@ -13,21 +16,33 @@ interface MarketingLayoutProps { export default async function MarketingLayout({ children, }: MarketingLayoutProps) { + const session = await getServerSession(authOptions) + return (