Merged in fix/handle-unpublished-profiling-consent (pull request #3275)
fix: handle unpublished profiling consent * fix: handle unpublished profiling consent Approved-by: Emma Zettervall Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -40,6 +40,7 @@ export const profilingConsentSchema = z
|
||||
})
|
||||
.transform((data) => {
|
||||
const profiling_consent = data.all_profiling_consent.items[0]
|
||||
if (!profiling_consent) return null
|
||||
return {
|
||||
icon: profiling_consent.main_icon,
|
||||
banner: profiling_consent.profiling_consent_banner,
|
||||
|
||||
@@ -2,12 +2,17 @@ import type { z } from "zod"
|
||||
|
||||
import type { profilingConsentSchema } from "../routers/contentstack/profilingConsent/output"
|
||||
|
||||
export interface GetProfilingConsentData
|
||||
extends z.input<typeof profilingConsentSchema> {}
|
||||
export interface GetProfilingConsentData extends z.input<
|
||||
typeof profilingConsentSchema
|
||||
> {}
|
||||
|
||||
export interface ProfilingConsent
|
||||
extends z.output<typeof profilingConsentSchema> {}
|
||||
export type ProfilingConsent = z.output<typeof profilingConsentSchema>
|
||||
export type ProfilingConsentNonNull = NonNullable<ProfilingConsent>
|
||||
|
||||
export type ProfilingConsentBanner = NonNullable<ProfilingConsent["banner"]>
|
||||
export type ProfilingConsentBanner = NonNullable<
|
||||
ProfilingConsentNonNull["banner"]
|
||||
>
|
||||
|
||||
export type ProfilingConsentModal = NonNullable<ProfilingConsent["modal"]>
|
||||
export type ProfilingConsentModal = NonNullable<
|
||||
ProfilingConsentNonNull["modal"]
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user