Merged in feat/LOY-497-Flag-Profiling-Consent (pull request #3292)
refactor(LOY-497): hide profiling consent behind feature flag * refactor(LOY-497): hide profiling consent behind feature flag * chore(LOY-497): up to date consent readme Approved-by: Matilda Landström
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
import { getProfile, getProfilingConsent } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import { GetMainIconByCSIdentifier, userHasConsent } from "../utils"
|
||||
@@ -8,6 +9,8 @@ import { BannerButton } from "./Button"
|
||||
import styles from "./profilingConsentBanner.module.css"
|
||||
|
||||
export async function ProfilingConsentBanner() {
|
||||
if (!env.ENABLE_PROFILE_CONSENT) return null
|
||||
|
||||
const user = await getProfile()
|
||||
if (!user || userHasConsent(user?.profilingConsent)) return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user