Merged in fix/sw-3551-rsc-bookingflowconfig (pull request #2988)

fix(SW-3551): Fix issue with BookingConfigProvider in RSC

* wip move config to pages

* Move config providing to pages
This commit is contained in:
Anton Gunnarsson
2025-10-22 07:04:21 +00:00
parent 2a28681259
commit c435cdba68
44 changed files with 398 additions and 237 deletions

View File

@@ -11,10 +11,7 @@ export async function getUserPointsBalance(
const verifiedUser =
session.token.loginType === "eurobonus"
? await getEuroBonusProfileData({
accessToken: session.token.access_token,
loginType: session.token.loginType,
})
? await getEuroBonusProfileSafely(session)
: await getVerifiedUser({ session })
if (!verifiedUser || "error" in verifiedUser) {
@@ -28,3 +25,14 @@ export async function getUserPointsBalance(
return points ?? 0
}
async function getEuroBonusProfileSafely(session: Session) {
try {
return await getEuroBonusProfileData({
accessToken: session.token.access_token,
loginType: session.token.loginType,
})
} catch (_error) {
return undefined
}
}