fix: add login/logout buttons
This commit is contained in:
@@ -2,6 +2,8 @@ import { homeHrefs } from "@/constants/homeHrefs"
|
||||
import { env } from "@/env/server"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
|
||||
import { MainMenu } from "./MainMenu"
|
||||
import OfflineBanner from "./OfflineBanner"
|
||||
import TopMenu from "./TopMenu"
|
||||
@@ -15,6 +17,7 @@ export default async function Header({
|
||||
languageSwitcher,
|
||||
}: LangParams & { languageSwitcher: React.ReactNode }) {
|
||||
const data = await serverClient().contentstack.config.header({ lang })
|
||||
const session = await auth()
|
||||
|
||||
const homeHref = homeHrefs[env.NODE_ENV][lang]
|
||||
const { frontpage_link_text, logo, menu, top_menu } = data
|
||||
@@ -40,6 +43,8 @@ export default async function Header({
|
||||
logo={logo}
|
||||
topMenuMobileLinks={topMenuMobileLinks}
|
||||
languageSwitcher={languageSwitcher}
|
||||
bookingHref={homeHref}
|
||||
isLoggedIn={!!session}
|
||||
/>
|
||||
</header>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user