Merged in fix/my-stay-webview-2 (pull request #2191)

fix: webview - mystay - check if we have webviewToken

* fix: webview - mystay - check if we have webviewToken

* Cleanup


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-05-22 08:38:20 +00:00
parent fe1f4b063d
commit 2ec309354e
12 changed files with 46 additions and 47 deletions

View File

@@ -1,7 +1,6 @@
import { getHeader } from "@/lib/trpc/memoizedRequests"
import { auth } from "@/auth"
import { isValidSession } from "@/utils/session"
import { isLoggedInUser } from "@/utils/isLoggedInUser"
import MobileMenu from "../MobileMenu"
@@ -10,17 +9,15 @@ export default async function MobileMenuWrapper({
}: React.PropsWithChildren) {
// preloaded
const header = await getHeader()
const session = await auth()
if (!header) {
return null
}
const isLoggedIn = await isLoggedInUser()
return (
<MobileMenu
topLink={header.data.topLink}
isLoggedIn={isValidSession(session)}
>
<MobileMenu topLink={header.data.topLink} isLoggedIn={isLoggedIn}>
{children}
</MobileMenu>
)