diff --git a/web/core/layouts/auth-layout/workspace-wrapper.tsx b/web/core/layouts/auth-layout/workspace-wrapper.tsx
index 2dd658704e3..ab39dd76147 100644
--- a/web/core/layouts/auth-layout/workspace-wrapper.tsx
+++ b/web/core/layouts/auth-layout/workspace-wrapper.tsx
@@ -8,11 +8,12 @@ import { useParams } from "next/navigation";
import { useTheme } from "next-themes";
import useSWR from "swr";
import useSWRImmutable from "swr/immutable";
-
+// ui
import { LogOut } from "lucide-react";
-// hooks
import { Button, setToast, TOAST_TYPE, Tooltip } from "@plane/ui";
+// components
import { LogoSpinner } from "@/components/common";
+// hooks
import { useMember, useProject, useUser, useUserPermissions, useWorkspace } from "@/hooks/store";
import { useFavorite } from "@/hooks/store/use-favorite";
import { usePlatformOS } from "@/hooks/use-platform-os";
@@ -25,12 +26,13 @@ import PlaneBlackLogo from "@/public/plane-logos/black-horizontal-with-blue-logo
import PlaneWhiteLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png";
import WorkSpaceNotAvailable from "@/public/workspace/workspace-not-available.png";
-export interface IWorkspaceAuthWrapper {
+interface IWorkspaceAuthWrapper {
children: ReactNode;
+ isLoading?: boolean;
}
export const WorkspaceAuthWrapper: FC
= observer((props) => {
- const { children } = props;
+ const { children, isLoading: isParentLoading = false } = props;
// router params
const { workspaceSlug } = useParams();
// next themes
@@ -51,11 +53,11 @@ export const WorkspaceAuthWrapper: FC = observer((props)
[EUserPermissions.ADMIN, EUserPermissions.MEMBER],
EUserPermissionsLevel.WORKSPACE
);
-
const planeLogo = resolvedTheme === "dark" ? PlaneWhiteLogo : PlaneBlackLogo;
const allWorkspaces = workspaces ? Object.values(workspaces) : undefined;
const currentWorkspace =
(allWorkspaces && allWorkspaces.find((workspace) => workspace?.slug === workspaceSlug)) || undefined;
+ const currentWorkspaceInfo = workspaceSlug && workspaceInfoBySlug(workspaceSlug.toString());
// fetching user workspace information
useSWR(
@@ -116,11 +118,8 @@ export const WorkspaceAuthWrapper: FC = observer((props)
);
};
- // derived values
- const currentWorkspaceInfo = workspaceSlug && workspaceInfoBySlug(workspaceSlug.toString());
-
// if list of workspaces are not there then we have to render the spinner
- if (allWorkspaces === undefined || loader || isDBInitializing) {
+ if (isParentLoading || allWorkspaces === undefined || loader || isDBInitializing) {
return (
diff --git a/web/ee/layouts/project-wrapper.tsx b/web/ee/layouts/project-wrapper.tsx
new file mode 100644
index 00000000000..911665c9786
--- /dev/null
+++ b/web/ee/layouts/project-wrapper.tsx
@@ -0,0 +1 @@
+export * from "ce/layouts/project-wrapper";
diff --git a/web/ee/layouts/workspace-wrapper.tsx b/web/ee/layouts/workspace-wrapper.tsx
new file mode 100644
index 00000000000..186266fc1ad
--- /dev/null
+++ b/web/ee/layouts/workspace-wrapper.tsx
@@ -0,0 +1 @@
+export * from "ce/layouts/workspace-wrapper";