Merged in feat/3614-basicInfo (pull request #3427)
feat(SW-3614): use new loyalty prop in basicProfile * feat(SW-3614): use new loyalty prop in basicProfile * PR fixes Approved-by: Matilda Landström
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK"
|
||||
import { getEurobonusMembership } from "@scandic-hotels/trpc/routers/user/helpers"
|
||||
import {
|
||||
getEurobonusMembership,
|
||||
scandicMembershipTypes,
|
||||
} from "@scandic-hotels/trpc/routers/user/helpers"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
import {
|
||||
getBasicProfileSafely,
|
||||
getProfileSafely,
|
||||
getProfilingConsent,
|
||||
} from "@/lib/trpc/memoizedRequests"
|
||||
@@ -85,10 +89,10 @@ async function MyPagesLayoutBase({
|
||||
breadcrumbs,
|
||||
children,
|
||||
}: MyPagesLayoutProps) {
|
||||
const profile = await getProfileSafely()
|
||||
const eurobonusMembership = profile?.loyalty
|
||||
? getEurobonusMembership(profile.loyalty)
|
||||
: null
|
||||
const profile = await getBasicProfileSafely()
|
||||
const eurobonusMembership = profile?.loyalty?.memberships?.find(
|
||||
(m) => m.membershipType === scandicMembershipTypes.SAS_EB
|
||||
)
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
|
||||
Reference in New Issue
Block a user