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,13 +1,12 @@
import SurpriseIcon from "@scandic-hotels/design-system/Icons/SurpriseIcon"
import { auth } from "@/auth"
import Image from "@/components/Image"
import Button from "@/components/TempDesignSystem/Button"
import Link from "@/components/TempDesignSystem/Link"
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import Body from "@/components/TempDesignSystem/Text/Body"
import Title from "@/components/TempDesignSystem/Text/Title"
import { isValidSession } from "@/utils/session"
import { isLoggedInUser } from "@/utils/isLoggedInUser"
import styles from "./joinScandicFriends.module.css"
@@ -20,8 +19,7 @@ interface JoinScandicFriendsProps {
export default async function JoinScandicFriends({
content,
}: JoinScandicFriendsProps) {
const session = await auth()
const isLoggedIn = isValidSession(session)
const isLoggedIn = await isLoggedInUser()
if (isLoggedIn) {
return null
}