Merged in feat/booking-flow-performance (pull request #1282)

feat: booking flow performance

* feat: booking flow performance

* Cleanup


Approved-by: Michael Zetterberg
Approved-by: Pontus Dreij
This commit is contained in:
Linus Flood
2025-02-08 10:40:42 +00:00
parent bd779a15a4
commit ebb007b7f0
10 changed files with 39 additions and 111 deletions

View File

@@ -1,8 +1,7 @@
import {
getHeader,
getLanguageSwitcher,
getName,
} from "@/lib/trpc/memoizedRequests"
import { getHeader, getLanguageSwitcher } from "@/lib/trpc/memoizedRequests"
import { auth } from "@/auth"
import { isValidSession } from "@/utils/session"
import MobileMenu from "../MobileMenu"
@@ -12,7 +11,7 @@ export default async function MobileMenuWrapper({
// preloaded
const languages = await getLanguageSwitcher()
const header = await getHeader()
const user = await getName()
const session = await auth()
if (!languages || !header) {
return null
@@ -22,7 +21,7 @@ export default async function MobileMenuWrapper({
<MobileMenu
languageUrls={languages.urls}
topLink={header.data.topLink}
isLoggedIn={!!user}
isLoggedIn={isValidSession(session)}
>
{children}
</MobileMenu>