diff --git a/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx index 5c15385f7..89b94426b 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/SAS/LinkedAccounts/index.tsx @@ -288,7 +288,7 @@ async function TierMatchMessageSkeleton() { type TierMatchExpirationProps = { matchState: MatchState - sasExpirationDate: string | undefined + sasExpirationDate: string | null scandicExpirationDate: string | undefined } async function TierMatchExpiration({ diff --git a/apps/scandic-web/components/MyPages/myprofile/membershipCards/membershipcards.tsx b/apps/scandic-web/components/MyPages/myprofile/membershipCards/membershipcards.tsx index 439898bd5..6d8de5eaf 100644 --- a/apps/scandic-web/components/MyPages/myprofile/membershipCards/membershipcards.tsx +++ b/apps/scandic-web/components/MyPages/myprofile/membershipCards/membershipcards.tsx @@ -70,7 +70,7 @@ export default async function MembershipCardSlot() { defaultMessage: "Expiration Date: {expirationDate}", }, { - expirationDate: card.expirationDate.split("T")[0], + expirationDate: card.expirationDate?.split("T")[0], } )} diff --git a/apps/scandic-web/server/routers/user/output.ts b/apps/scandic-web/server/routers/user/output.ts index 716fd5212..7046dc97f 100644 --- a/apps/scandic-web/server/routers/user/output.ts +++ b/apps/scandic-web/server/routers/user/output.ts @@ -11,7 +11,7 @@ const sasEurobonusTier = z.enum(["EBB", "EBS", "EBG", "EBD", "EBP"]) const commonMembershipSchema = z.object({ membershipNumber: z.string(), - tierExpires: z.string(), + tierExpires: z.string().nullish().default(null), memberSince: z.string().nullish(), })