mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +08:00
feat(electron): enable disable cloud alert (#2184)
This commit is contained in:
@@ -8,6 +8,7 @@ import { lazy, Suspense, useCallback, useTransition } from 'react';
|
||||
import {
|
||||
currentWorkspaceIdAtom,
|
||||
openCreateWorkspaceModalAtom,
|
||||
openDisableCloudAlertModalAtom,
|
||||
openWorkspacesModalAtom,
|
||||
} from '../atoms';
|
||||
import { useAffineLogIn } from '../hooks/affine/use-affine-log-in';
|
||||
@@ -29,6 +30,14 @@ const CreateWorkspaceModal = lazy(() =>
|
||||
}))
|
||||
);
|
||||
|
||||
const TmpDisableAffineCloudModal = lazy(() =>
|
||||
import('../components/affine/tmp-disable-affine-cloud-modal').then(
|
||||
module => ({
|
||||
default: module.TmpDisableAffineCloudModal,
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
export function Modals() {
|
||||
const [openWorkspacesModal, setOpenWorkspacesModal] = useAtom(
|
||||
openWorkspacesModalAtom
|
||||
@@ -37,6 +46,10 @@ export function Modals() {
|
||||
openCreateWorkspaceModalAtom
|
||||
);
|
||||
|
||||
const [openDisableCloudAlertModal, setOpenDisableCloudAlertModal] = useAtom(
|
||||
openDisableCloudAlertModalAtom
|
||||
);
|
||||
|
||||
const router = useRouter();
|
||||
const { jumpToSubPath } = useRouterHelper(router);
|
||||
const user = useCurrentUser();
|
||||
@@ -49,6 +62,14 @@ export function Modals() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Suspense>
|
||||
<TmpDisableAffineCloudModal
|
||||
open={openDisableCloudAlertModal}
|
||||
onClose={useCallback(() => {
|
||||
setOpenDisableCloudAlertModal(false);
|
||||
}, [setOpenDisableCloudAlertModal])}
|
||||
/>
|
||||
</Suspense>
|
||||
<Suspense>
|
||||
<WorkspaceListModal
|
||||
disabled={transitioning}
|
||||
|
||||
Reference in New Issue
Block a user