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 { getSavedPaymentCardsSafely } from "@/lib/trpc/memoizedRequests"
import { auth } from "@/auth"
import { isValidSession } from "@/utils/session"
import { isLoggedInUser } from "@/utils/isLoggedInUser"
import PaymentClient from "./PaymentClient"
@@ -14,8 +13,7 @@ export default async function Payment({
const savedCreditCards = await getSavedPaymentCardsSafely({
supportedCards,
})
const session = await auth()
const isUserLoggedIn = isValidSession(session)
const isUserLoggedIn = await isLoggedInUser()
return (
<PaymentClient

View File

@@ -12,11 +12,10 @@ import {
getProfileSafely,
} from "@/lib/trpc/memoizedRequests"
import { auth } from "@/auth"
import { getIntl } from "@/i18n"
import { isLoggedInUser } from "@/utils/isLoggedInUser"
import * as maskValue from "@/utils/maskValue"
import { parseRefId } from "@/utils/refId"
import { isValidSession } from "@/utils/session"
import AdditionalInfoForm from "../../FindMyBooking/AdditionalInfoForm"
import accessBooking, {
@@ -41,8 +40,7 @@ export async function Receipt({ refId }: { refId: string }) {
return notFound()
}
const session = await auth()
const isLoggedIn = isValidSession(session)
const isLoggedIn = await isLoggedInUser()
const bv = cookies().get("bv")?.value
let bookingConfirmation