From cb402b88fcaf5c9531488270d077318af7b32372 Mon Sep 17 00:00:00 2001 From: Marcos Date: Thu, 11 Jul 2024 15:51:20 -0300 Subject: [PATCH] fix: Added ensureConfig() rather than conditioning the render --- src/components/Disclosure/index.jsx | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/Disclosure/index.jsx b/src/components/Disclosure/index.jsx index 77bd6962..1c6edada 100644 --- a/src/components/Disclosure/index.jsx +++ b/src/components/Disclosure/index.jsx @@ -3,10 +3,12 @@ import React from 'react'; import { Hyperlink, Icon } from '@openedx/paragon'; import { Chat } from '@openedx/paragon/icons'; -import { getConfig } from '@edx/frontend-platform/config'; +import { ensureConfig, getConfig } from '@edx/frontend-platform/config'; import './Disclosure.scss'; +ensureConfig(['PRIVACY_POLICY_URL']); + const Disclosure = ({ children }) => (

@@ -30,21 +32,19 @@ const Disclosure = ({ children }) => (

- {getConfig().PRIVACY_POLICY_URL ? ( -

- Note: - This chat is AI generated (powered by ChatGPT). Mistakes are possible. - By using it you agree that edX may create a record of this chat. - Your personal data will be used as described in our  - - privacy policy - - . -

- ) : null } +

+ Note: + This chat is AI generated (powered by ChatGPT). Mistakes are possible. + By using it you agree that edX may create a record of this chat. + Your personal data will be used as described in our  + + privacy policy + + . +

{children} );