Remove payments API routing initialization
[ProtonMail-WebClient.git] / packages / components / containers / publicAppSetup / PublicAppSetup.tsx
blob9fb477aa087d6fa4dc9cbabf53e9d4f00ee84213
1 import type { ReactNode } from 'react';
2 import { useEffect } from 'react';
4 import useApi from '@proton/components/hooks/useApi';
5 import { getInboxDesktopInfo, hasInboxDesktopFeature } from '@proton/shared/lib/desktop/ipcHelpers';
6 import { reportClientLaunch } from '@proton/shared/lib/desktop/reportClientLaunch';
7 import { isElectronMail } from '@proton/shared/lib/helpers/desktop';
9 interface Props {
10     children: ReactNode;
13 const PublicAppSetup = ({ children }: Props) => {
14     const api = useApi();
16     useEffect(() => {
17         if (isElectronMail && hasInboxDesktopFeature('InstallSource')) {
18             void reportClientLaunch(getInboxDesktopInfo('installSource'), 'mail', api);
19         }
20     }, []);
22     return children;
25 export default PublicAppSetup;