Merged in feat/LOY-484-consent-alert (pull request #3184)
feat(LOY-484): Change toast to alert for Profiling Consent * feat(LOY-484): change toast to alert using context * refactor(LOY-484): remove uneccesary code * chore(LOY-484): small UI fixes Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
getProfilingConsent,
|
||||
} from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import ProfilingConsentAlert from "@/components/MyPages/ProfilingConsent/Alert"
|
||||
import { ProfilingConsentAlertProvider } from "@/components/MyPages/ProfilingConsent/Alert/AlertContext"
|
||||
import ProfilingConsentModal from "@/components/MyPages/ProfilingConsent/Modal"
|
||||
import { userHasConsent } from "@/components/MyPages/ProfilingConsent/utils"
|
||||
import { SASLevelUpgradeCheck } from "@/components/MyPages/SASLevelUpgradeCheck"
|
||||
@@ -36,24 +38,32 @@ export default async function MyPagesLayout({
|
||||
const lang = await getLang()
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.layout}>
|
||||
{breadcrumbs}
|
||||
<div className={styles.content}>{children}</div>
|
||||
</div>
|
||||
<ProfilingConsentAlertProvider>
|
||||
<div className={styles.container}>
|
||||
<div className={styles.layout}>
|
||||
{breadcrumbs}
|
||||
|
||||
{eurobonusMembership && <SASLevelUpgradeCheck />}
|
||||
<Surprises />
|
||||
{memberKey && profilingConsent && !hasConsent ? (
|
||||
<>
|
||||
<ProfilingConsentModal
|
||||
memberKey={memberKey}
|
||||
content={profilingConsent.modal}
|
||||
iconIdentifier={profilingConsent.icon}
|
||||
/>
|
||||
<TrackingSDK pageData={{ domainLanguage: lang, ...ModalTracking }} />
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
<div className={styles.content}>
|
||||
<ProfilingConsentAlert />
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{eurobonusMembership && <SASLevelUpgradeCheck />}
|
||||
<Surprises />
|
||||
{memberKey && profilingConsent && !hasConsent ? (
|
||||
<>
|
||||
<ProfilingConsentModal
|
||||
memberKey={memberKey}
|
||||
content={profilingConsent.modal}
|
||||
iconIdentifier={profilingConsent.icon}
|
||||
/>
|
||||
<TrackingSDK
|
||||
pageData={{ domainLanguage: lang, ...ModalTracking }}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
</ProfilingConsentAlertProvider>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user