1 import type { ReactNode } from 'react';
3 import { useApi } from '@proton/components';
4 import { UnleashFlagProvider } from '@proton/unleash';
6 import { PublicSessionProvider } from './_api';
7 import { DevicesProvider } from './_devices';
8 import { DownloadsProvider, PublicDownloadsProvider } from './_downloads';
9 import { DriveEventManagerProvider } from './_events';
10 import { InvitationsStateProvider } from './_invitations/useInvitationsState';
11 import { LinksProvider, PublicLinksProvider } from './_links';
12 import { PhotosProvider } from './_photos';
13 import { SearchProvider } from './_search';
14 import { SharesProvider } from './_shares';
15 import { UploadProvider } from './_uploads';
16 import { VolumesProvider } from './_volumes';
18 interface DriveProviderProps {
22 export function DriveProvider({ children }: DriveProviderProps) {
24 <DriveEventManagerProvider>
33 <InvitationsStateProvider>{children}</InvitationsStateProvider>
42 </DriveEventManagerProvider>
46 interface PublicDriveProviderProps {
50 export function PublicDriveProvider({ children }: PublicDriveProviderProps) {
53 <UnleashFlagProvider api={api}>
54 <PublicSessionProvider>
58 <PublicDownloadsProvider>{children}</PublicDownloadsProvider>
59 </PublicLinksProvider>
62 </PublicSessionProvider>
63 </UnleashFlagProvider>