diff --git a/frontend/src/component/feedbackNew/FeedbackComponent.tsx b/frontend/src/component/feedbackNew/FeedbackComponent.tsx index 55d170a2fd..671193931e 100644 --- a/frontend/src/component/feedbackNew/FeedbackComponent.tsx +++ b/frontend/src/component/feedbackNew/FeedbackComponent.tsx @@ -20,9 +20,9 @@ import type { IToast } from 'interfaces/toast'; import { useTheme } from '@mui/material/styles'; import type { FeedbackData, FeedbackMode } from './FeedbackContext'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; -import { useUiFlag } from 'hooks/useUiFlag'; import useUserType from './useUserType'; import { BaseModal } from 'component/common/SidebarModal/SidebarModal'; +import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; export const ParentContainer = styled('div')(({ theme }) => ({ position: 'relative', @@ -205,12 +205,13 @@ export const FeedbackComponent = ({ const userType = useUserType(); const { trackEvent } = usePlausibleTracker(); const theme = useTheme(); + const { uiConfig } = useUiConfig(); const { addFeedback } = useUserFeedbackApi(); const { setHasSubmittedFeedback } = useUserSubmittedFeedback( feedbackData.category, ); - const feedbackComments = useUiFlag('feedbackComments'); + const feedbackComments = uiConfig?.flags?.feedbackComments; function isProvideFeedbackSchema(data: any): data is ProvideFeedbackSchema { data.difficultyScore = data.difficultyScore @@ -329,8 +330,7 @@ export const FeedbackComponent = ({ - {feedbackComments !== false && - feedbackComments.enabled && + {feedbackComments?.enabled && feedbackComments.name === 'withoutComments' ? ( <> diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 77312fde2a..d02632391c 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -310,17 +310,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_DATA_USAGE_MULTI_MONTH_VIEW, false, ), - uiGlobalFontSize: { - name: 'uiGlobalFontSize', - enabled: parseEnvVarBoolean( - process.env.EXPERIMENTAL_UI_GLOBAL_FONT_SIZE_NAME, - false, - ), - payload: { - type: PayloadType.JSON, - value: '14', - }, - }, + uiGlobalFontSize: parseEnvVarBoolean( + process.env.EXPERIMENTAL_UI_GLOBAL_FONT_SIZE_NAME, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = {