perf: optimize Tasker boot and kanban load
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
import { lazy, Suspense } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { useCommandPalette } from "@/hooks/store/use-command-palette";
|
||||
|
||||
const ProfileSettingsModal = lazy(() =>
|
||||
import("@/components/settings/profile/modal").then((module) => ({
|
||||
@@ -24,6 +25,10 @@ type TGlobalModalsProps = {
|
||||
* - Profile settings modal
|
||||
*/
|
||||
export const GlobalModals = observer(function GlobalModals(_props: TGlobalModalsProps) {
|
||||
const { profileSettingsModal } = useCommandPalette();
|
||||
|
||||
if (!profileSettingsModal.isOpen) return null;
|
||||
|
||||
return (
|
||||
<Suspense fallback={null}>
|
||||
<ProfileSettingsModal />
|
||||
|
||||
Reference in New Issue
Block a user