diff --git a/interface/src/app/settings/ApplicationSettings.tsx b/interface/src/app/settings/ApplicationSettings.tsx index c62ed179e..84455c077 100644 --- a/interface/src/app/settings/ApplicationSettings.tsx +++ b/interface/src/app/settings/ApplicationSettings.tsx @@ -40,23 +40,12 @@ import { BOARD_PROFILES } from '../main/types'; import type { APIcall, BoardProfileKey, Settings } from '../main/types'; import { createSettingsValidator } from '../main/validators'; -export function boardProfileSelectItems(boardProfile?: string, developerMode?: boolean, LL?: any) { - const items = Object.keys(BOARD_PROFILES).map((code) => ( +export function boardProfileSelectItems() { + return Object.keys(BOARD_PROFILES).map((code) => ( {BOARD_PROFILES[code as BoardProfileKey]} )); - - if (boardProfile === 'CUSTOM' || developerMode) { - items.push(); - items.push( - - {LL?.CUSTOM()} - - ); - } - - return items; } const ApplicationSettings = () => { @@ -192,10 +181,7 @@ const ApplicationSettings = () => { }, [validateAndSubmit, doRestart]); // Memoize board profile select items to prevent recreation - const boardProfileItems = useMemo( - () => boardProfileSelectItems(data?.board_profile, data?.developer_mode, LL), - [data?.board_profile, data?.developer_mode, LL] - ); + const boardProfileItems = useMemo(() => boardProfileSelectItems(), []); const content = () => { if (!data || !hardwareData) { @@ -516,6 +502,12 @@ const ApplicationSettings = () => { ) : ( boardProfileItems )} + + {(data.board_profile === 'CUSTOM' || data.developer_mode) && ( + + {LL.CUSTOM()}… + + )} {data.board_profile === 'CUSTOM' && ( <>