Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / components / hooks / useShowThemeSelection.ts
blob8b431a74dfc89e32db89db170f9ba3c277fd5f48
1 import { hasInboxDesktopFeature } from '@proton/shared/lib/desktop/ipcHelpers';
2 import { useFlag } from '@proton/unleash';
4 import useIsInboxElectronApp from './useIsInboxElectronApp';
6 const useShowThemeSelection = () => {
7     const { isElectron } = useIsInboxElectronApp();
8     const inboxDesktopThemeSelectionFlag = useFlag('InboxDesktopThemeSelection');
9     return isElectron ? hasInboxDesktopFeature('ThemeSelection') && inboxDesktopThemeSelectionFlag : true;
12 export default useShowThemeSelection;