hide localization toggle

This commit is contained in:
Mary Hipp 2023-07-26 10:55:38 -04:00
parent 385483ff8e
commit f86d0d1b69

View File

@ -104,6 +104,7 @@ type ConfigOptions = {
shouldShowAdvancedOptionsSettings: boolean;
shouldShowClearIntermediates: boolean;
shouldShowNodesToggle: boolean;
shouldShowLocalizationToggle: boolean;
};
type SettingsModalProps = {
@ -125,6 +126,8 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
const shouldShowClearIntermediates =
config?.shouldShowClearIntermediates ?? true;
const shouldShowNodesToggle = config?.shouldShowNodesToggle ?? true;
const shouldShowLocalizationToggle =
config?.shouldShowLocalizationToggle ?? true;
useEffect(() => {
if (!shouldShowDeveloperSettings) {
@ -325,6 +328,7 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
onChange={handleToggleNodes}
/>
)}
{shouldShowLocalizationToggle && (
<IAIMantineSelect
disabled={!isLocalizationEnabled}
label={t('common.languagePickerLabel')}
@ -335,6 +339,7 @@ const SettingsModal = ({ children, config }: SettingsModalProps) => {
}))}
onChange={handleLanguageChanged}
/>
)}
</StyledFlex>
{shouldShowDeveloperSettings && (