2 SUPPORTED_ELECTRON_APP,
6 } from '@proton/shared/lib/helpers/desktop';
7 import { type FeatureFlag, useFlag } from '@proton/unleash';
9 import useConfig from './useConfig';
11 const useIsElectronApp = (flag: FeatureFlag) => {
12 const { APP_NAME } = useConfig();
14 const electronFlag = useFlag(flag);
15 const isElectronDisabled = isElectronApp && electronFlag;
16 const isSupportedElectronApp = SUPPORTED_ELECTRON_APP.includes(APP_NAME);
19 isElectron: isElectronApp,
21 isElectronEnabled: !isElectronDisabled,
22 isElectronOnMac: isElectronOnMac,
23 isElectronOnWindows: isElectronOnWindows,
24 isSupportedElectronApp,
28 export default useIsElectronApp;