2022-02-28 13:48:59 +05:00
|
|
|
import React from 'react';
|
2022-04-24 05:59:14 +05:00
|
|
|
import { useThemeStore } from '../../stores/use-theme-store';
|
2022-02-28 15:32:55 +05:00
|
|
|
import { AnnouncementDialog } from '../announcements';
|
|
|
|
|
import { AttachmentDialog } from '../attachments';
|
2022-02-28 13:48:59 +05:00
|
|
|
import Auth from '../auth';
|
2022-07-05 14:33:48 +05:00
|
|
|
import AuthModal from '../auth/auth-modal';
|
2022-02-28 13:48:59 +05:00
|
|
|
import { SessionExpired } from '../auth/session-expired';
|
|
|
|
|
import { Dialog } from '../dialog';
|
2022-05-20 14:49:38 +05:00
|
|
|
import { AddTopicDialog } from '../dialogs/add-topic';
|
|
|
|
|
import ResultDialog from '../dialogs/result';
|
|
|
|
|
import { VaultDialog } from '../dialogs/vault';
|
2022-02-28 13:48:59 +05:00
|
|
|
import ImagePreview from '../image-preview';
|
2022-02-28 15:32:55 +05:00
|
|
|
import MergeConflicts from '../merge-conflicts';
|
2022-02-28 13:48:59 +05:00
|
|
|
import PremiumDialog from '../premium';
|
|
|
|
|
import { Expiring } from '../premium/expiring';
|
2022-05-20 14:49:38 +05:00
|
|
|
import SheetProvider from '../sheet-provider';
|
|
|
|
|
import { AddNotebookSheet } from '../sheets/add-notebook';
|
|
|
|
|
import AddToNotebookSheet from '../sheets/add-to';
|
|
|
|
|
import ExportNotesSheet from '../sheets/export-notes';
|
|
|
|
|
import ManageTagsSheet from '../sheets/manage-tags';
|
2022-02-28 15:32:55 +05:00
|
|
|
import PublishNoteSheet from '../sheets/publish-note';
|
|
|
|
|
import RateAppSheet from '../sheets/rate-app';
|
|
|
|
|
import RecoveryKeySheet from '../sheets/recovery-key';
|
|
|
|
|
import RestoreDataSheet from '../sheets/restore-data';
|
2022-02-28 13:48:59 +05:00
|
|
|
|
2022-03-07 15:19:07 +05:00
|
|
|
const DialogProvider = React.memo(
|
|
|
|
|
() => {
|
|
|
|
|
const colors = useThemeStore(state => state.colors);
|
2022-02-28 13:48:59 +05:00
|
|
|
|
2022-03-07 15:19:07 +05:00
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Dialog context="global" />
|
|
|
|
|
<AddTopicDialog colors={colors} />
|
|
|
|
|
<AddNotebookSheet colors={colors} />
|
|
|
|
|
<PremiumDialog colors={colors} />
|
2022-07-05 14:33:48 +05:00
|
|
|
<AuthModal colors={colors} />
|
2022-03-07 15:19:07 +05:00
|
|
|
<MergeConflicts />
|
|
|
|
|
<ExportNotesSheet />
|
|
|
|
|
<RecoveryKeySheet colors={colors} />
|
|
|
|
|
<SheetProvider />
|
2022-04-01 00:56:10 +05:00
|
|
|
<SheetProvider context="sync_progress" />
|
2022-03-07 15:19:07 +05:00
|
|
|
<RestoreDataSheet />
|
|
|
|
|
<ResultDialog />
|
|
|
|
|
<VaultDialog colors={colors} />
|
|
|
|
|
<AddToNotebookSheet colors={colors} />
|
|
|
|
|
<RateAppSheet />
|
|
|
|
|
<ImagePreview />
|
|
|
|
|
<PublishNoteSheet />
|
|
|
|
|
<ManageTagsSheet />
|
|
|
|
|
<AttachmentDialog />
|
|
|
|
|
<Expiring />
|
|
|
|
|
<AnnouncementDialog />
|
|
|
|
|
<SessionExpired />
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
() => true
|
|
|
|
|
);
|
2022-02-28 13:48:59 +05:00
|
|
|
|
2022-03-07 15:19:07 +05:00
|
|
|
export default DialogProvider;
|