From 113b1345a84866b0e0789c830d387c9161d29622 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Wed, 25 Jan 2023 11:02:32 +0100 Subject: [PATCH] Hide anaonymize data field on preference page (#21733) --- .../PreferencesForm/PreferencesForm.tsx | 58 ++++++++++--------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/airbyte-webapp/src/views/Settings/PreferencesForm/PreferencesForm.tsx b/airbyte-webapp/src/views/Settings/PreferencesForm/PreferencesForm.tsx index 0b88f593030cb..84225c929412a 100644 --- a/airbyte-webapp/src/views/Settings/PreferencesForm/PreferencesForm.tsx +++ b/airbyte-webapp/src/views/Settings/PreferencesForm/PreferencesForm.tsx @@ -9,6 +9,7 @@ import LabeledInput from "components/LabeledInput"; import { LabeledSwitch } from "components/LabeledSwitch"; import { Button } from "components/ui/Button"; +import { useConfig } from "config"; import { links } from "utils/links"; import EditControls from "./components/EditControls"; @@ -70,12 +71,13 @@ const PreferencesForm: React.FC = ({ errorMessage, }) => { const { formatMessage } = useIntl(); + const config = useConfig(); return ( = ({ )} - - - - - ( - - {docs} - - ), - }} - /> - - - - {({ field }: FieldProps) => ( - } + {config.segment.enabled && ( + <> + + + + + ( + + {docs} + + ), + }} /> - )} - - + + + + {({ field }: FieldProps) => ( + } + /> + )} + + + + )}