1 import type { ReactNode } from 'react';
3 import EventNotices from '@proton/components/containers/eventManager/EventNotices';
4 import NotificationsChildren from '@proton/components/containers/notifications/Children';
5 import useConfig from '@proton/components/hooks/useConfig';
6 import useIsInboxElectronApp from '@proton/components/hooks/useIsInboxElectronApp';
8 import SessionRecoveryLocalStorageManager from '../account/sessionRecovery/SessionRecoveryLocalStorageManager';
9 import ForceRefreshProvider from '../forceRefresh/Provider';
10 import KeyTransparencyManager from '../keyTransparency/KeyTransparencyManager';
11 import DensityInjector from '../layouts/DensityInjector';
12 import ModalsChildren from '../modals/Children';
13 import PaymentSwitcher from '../payments/PaymentSwitcher';
14 import { ThemeInjector } from '../themes/ThemeInjector';
15 import ElectronBlockedContainer from './ElectronBlockedContainer';
16 import KeyBackgroundManager from './KeyBackgroundManager';
17 import StorageListener from './StorageListener';
22 hasPrivateMemberKeyGeneration?: boolean;
23 hasReadableMemberKeyActivation?: boolean;
24 hasMemberKeyMigration?: boolean;
27 const StandardPrivateApp = ({
29 hasPrivateMemberKeyGeneration,
30 hasMemberKeyMigration,
31 hasReadableMemberKeyActivation,
34 const { APP_NAME } = useConfig();
35 const { isElectronDisabled } = useIsInboxElectronApp();
37 if (isElectronDisabled) {
38 return <ElectronBlockedContainer />;
43 <KeyTransparencyManager appName={APP_NAME}>
44 <SessionRecoveryLocalStorageManager>
48 <NotificationsChildren />
49 {!noModals && <ModalsChildren />}
51 hasPrivateMemberKeyGeneration={hasPrivateMemberKeyGeneration}
52 hasReadableMemberKeyActivation={hasReadableMemberKeyActivation}
53 hasMemberKeyMigration={hasMemberKeyMigration}
56 <ForceRefreshProvider>{children}</ForceRefreshProvider>
57 </SessionRecoveryLocalStorageManager>
58 </KeyTransparencyManager>
63 export default StandardPrivateApp;