diff --git a/apps/partner-sas/components/BookingFlowProviders.tsx b/apps/partner-sas/components/BookingFlowProviders.tsx index 02bbe88c8..c438b3a07 100644 --- a/apps/partner-sas/components/BookingFlowProviders.tsx +++ b/apps/partner-sas/components/BookingFlowProviders.tsx @@ -14,11 +14,13 @@ const logger = createLogger("BookingFlowProviders") export function BookingFlowProviders({ children }: { children: ReactNode }) { const user = useBookingFlowUser() + const isLinkedUser = + !!user.data && user.data.type === "partner-sas" && user.data.isLinked return ( @@ -60,6 +62,7 @@ function useBookingFlowUser(): BookingFlowUser { firstName: euroBonusProfile.firstName || null, lastName: euroBonusProfile.lastName || null, email: euroBonusProfile.email, + isLinked: euroBonusProfile.linkStatus === "LINKED", }, } } diff --git a/apps/partner-sas/globals.css b/apps/partner-sas/globals.css index 4b01889f6..176786609 100644 --- a/apps/partner-sas/globals.css +++ b/apps/partner-sas/globals.css @@ -127,7 +127,7 @@ body.partner-sas { --Scandic-Brand-Warm-White: var(--Background-Primary); --Text-Accent-Primary: var(--SAS-20); - --Text-Accent-Secondary: var(--SAS-40); + --Text-Accent-Secondary: var(--SAS-Gray-40); --Text-Heading: var(--SAS-Gray-20); --Text-Interactive-Default: var(--SAS-40); --Text-Interactive-Hover: var(--SAS-40); diff --git a/apps/partner-sas/lib/trpc/index.ts b/apps/partner-sas/lib/trpc/index.ts index 071a3e560..b183cc88d 100644 --- a/apps/partner-sas/lib/trpc/index.ts +++ b/apps/partner-sas/lib/trpc/index.ts @@ -47,7 +47,9 @@ export async function createAppContext() { }, getScandicUser: async () => { const session = await getSession() - if (!session) return null + + // The getSession will either return empty object or session object, hence we need to validate if the object is empty or not + if (!session?.access_token) return null return await getVerifiedUser({ token: { diff --git a/packages/booking-flow/lib/bookingFlowContext.tsx b/packages/booking-flow/lib/bookingFlowContext.tsx index 21d92999d..66b20c7e0 100644 --- a/packages/booking-flow/lib/bookingFlowContext.tsx +++ b/packages/booking-flow/lib/bookingFlowContext.tsx @@ -12,6 +12,7 @@ export type BookingFlowUser = | (BaseUser & { type: "partner-sas" partnerLoyaltyNumber: `EB${string}` + isLinked: boolean }) | (BaseUser & { type: "scandic" diff --git a/packages/booking-flow/lib/components/BookingConfirmation/Receipt/Room/room.module.css b/packages/booking-flow/lib/components/BookingConfirmation/Receipt/Room/room.module.css index 18e4d22fd..9ba8c0c24 100644 --- a/packages/booking-flow/lib/components/BookingConfirmation/Receipt/Room/room.module.css +++ b/packages/booking-flow/lib/components/BookingConfirmation/Receipt/Room/room.module.css @@ -41,7 +41,7 @@ color: var(--Text-Default); &.discounted { - color: var(--Text-Accent-Primary); + color: var(--Surface-Brand-Primary-1-OnSurface-Accent); } } diff --git a/packages/booking-flow/lib/components/BookingConfirmation/Receipt/TotalPrice/totalPrice.module.css b/packages/booking-flow/lib/components/BookingConfirmation/Receipt/TotalPrice/totalPrice.module.css index b8cb276e3..de76e36b5 100644 --- a/packages/booking-flow/lib/components/BookingConfirmation/Receipt/TotalPrice/totalPrice.module.css +++ b/packages/booking-flow/lib/components/BookingConfirmation/Receipt/TotalPrice/totalPrice.module.css @@ -15,7 +15,7 @@ color: var(--Text-Default); &.discounted { - color: var(--Text-Accent-Primary); + color: var(--Surface-Brand-Primary-1-OnSurface-Accent); } } diff --git a/packages/booking-flow/lib/components/EnterDetails/Summary/UI/ui.module.css b/packages/booking-flow/lib/components/EnterDetails/Summary/UI/ui.module.css index b61add4fc..73e3b9c12 100644 --- a/packages/booking-flow/lib/components/EnterDetails/Summary/UI/ui.module.css +++ b/packages/booking-flow/lib/components/EnterDetails/Summary/UI/ui.module.css @@ -64,7 +64,7 @@ color: var(--Text-Default); &.discounted { - color: var(--Text-Accent-Primary); + color: var(--Surface-Brand-Primary-1-OnSurface-Accent); } }