diff --git a/.env b/.env index b160b8f44..0e6fba320 100644 --- a/.env +++ b/.env @@ -18,3 +18,5 @@ SHOW_CONFIGURABLE_COLOR_MAP = 'TRUE' ENABLE_USWDS_PAGE_HEADER = 'TRUE' # Enables the refactor page footer component that uses the USWDS design system ENABLE_USWDS_PAGE_FOOTER = 'TRUE' +# Enables the display of Cookie consent form +ENABLE_COOKIE_CONSENT_FORM = 'TRUE' diff --git a/app/scripts/components/common/layout-root/index.tsx b/app/scripts/components/common/layout-root/index.tsx index c072dec9e..241620158 100644 --- a/app/scripts/components/common/layout-root/index.tsx +++ b/app/scripts/components/common/layout-root/index.tsx @@ -41,6 +41,7 @@ import { checkEnvFlag } from '$utils/utils'; const appTitle = process.env.APP_TITLE; const appDescription = process.env.APP_DESCRIPTION; const isUswdsFooterEnabled = checkEnvFlag(process.env.ENABLE_USWDS_PAGE_FOOTER); +const isCookieConsentEnabled = checkEnvFlag(process.env.ENABLE_COOKIE_CONSENT_FORM); export const PAGE_BODY_ID = 'pagebody'; @@ -104,7 +105,7 @@ function LayoutRoot(props: { children?: ReactNode }) { {children} - {cookieConsentContent && displayCookieConsentForm && ( + {isCookieConsentEnabled && displayCookieConsentForm && (