{bars.map((color, index) => (
diff --git a/admin/components/common/toast.tsx b/admin/components/common/toast.tsx
new file mode 100644
index 000000000..fe4983db6
--- /dev/null
+++ b/admin/components/common/toast.tsx
@@ -0,0 +1,11 @@
+import { useTheme } from "next-themes";
+// ui
+import { Toast as ToastComponent } from "@plane/ui";
+// helpers
+import { resolveGeneralTheme } from "@/helpers/common.helper";
+
+export const Toast = () => {
+ const { theme } = useTheme();
+
+ return
;
+};
diff --git a/admin/components/new-user-popup.tsx b/admin/components/new-user-popup.tsx
index 6b4cea340..73a405d4a 100644
--- a/admin/components/new-user-popup.tsx
+++ b/admin/components/new-user-popup.tsx
@@ -17,11 +17,11 @@ import TakeoffIconDark from "/public/logos/takeoff-icon-dark.svg";
export const NewUserPopup: React.FC = observer(() => {
// hooks
const { isNewUserPopup, toggleNewUserPopup } = useTheme();
- const { instance } = useInstance();
+ const { config } = useInstance();
// theme
const { resolvedTheme } = nextUseTheme();
- const redirectionLink = `${instance?.config?.app_base_url ? `${instance?.config?.app_base_url}/create-workspace` : `/god-mode/`}`;
+ const redirectionLink = `${config?.app_base_url ? `${config?.app_base_url}/create-workspace` : `/god-mode/`}`;
if (!isNewUserPopup) return <>>;
return (
diff --git a/admin/hooks/store/use-instance.tsx b/admin/hooks/store/use-instance.tsx
index 15fdaf84f..cf2edc39f 100644
--- a/admin/hooks/store/use-instance.tsx
+++ b/admin/hooks/store/use-instance.tsx
@@ -1,6 +1,6 @@
import { useContext } from "react";
// store
-import { StoreContext } from "@/lib/app-providers";
+import { StoreContext } from "@/lib/store-provider";
import { IInstanceStore } from "@/store/instance.store";
export const useInstance = (): IInstanceStore => {
diff --git a/admin/hooks/store/use-theme.tsx b/admin/hooks/store/use-theme.tsx
index 95d2aa05e..bad89cfee 100644
--- a/admin/hooks/store/use-theme.tsx
+++ b/admin/hooks/store/use-theme.tsx
@@ -1,6 +1,6 @@
import { useContext } from "react";
// store
-import { StoreContext } from "@/lib/app-providers";
+import { StoreContext } from "@/lib/store-provider";
import { IThemeStore } from "@/store/theme.store";
export const useTheme = (): IThemeStore => {
diff --git a/admin/hooks/store/use-user.tsx b/admin/hooks/store/use-user.tsx
index c8cb45250..823003144 100644
--- a/admin/hooks/store/use-user.tsx
+++ b/admin/hooks/store/use-user.tsx
@@ -1,6 +1,6 @@
import { useContext } from "react";
// store
-import { StoreContext } from "@/lib/app-providers";
+import { StoreContext } from "@/lib/store-provider";
import { IUserStore } from "@/store/user.store";
export const useUser = (): IUserStore => {
diff --git a/admin/layouts/admin-layout.tsx b/admin/layouts/admin-layout.tsx
index f7f828954..6da565345 100644
--- a/admin/layouts/admin-layout.tsx
+++ b/admin/layouts/admin-layout.tsx
@@ -2,14 +2,13 @@
import { FC, ReactNode, useEffect } from "react";
import { observer } from "mobx-react-lite";
import { useRouter } from "next/navigation";
-import useSWR from "swr";
// components
import { InstanceSidebar } from "@/components/admin-sidebar";
import { InstanceHeader } from "@/components/auth-header";
import { LogoSpinner } from "@/components/common";
import { NewUserPopup } from "@/components/new-user-popup";
// hooks
-import { useInstance, useUser } from "@/hooks/store";
+import { useUser } from "@/hooks/store";
type TAdminLayout = {
children: ReactNode;
@@ -19,15 +18,7 @@ export const AdminLayout: FC
= observer((props) => {
const { children } = props;
// router
const router = useRouter();
- // hooks
- const { fetchInstanceAdmins } = useInstance();
- const { fetchCurrentUser, isUserLoggedIn } = useUser();
-
- useSWR("INSTANCE_ADMINS", () => fetchInstanceAdmins());
-
- useSWR("CURRENT_USER", () => fetchCurrentUser(), {
- shouldRetryOnError: false,
- });
+ const { isUserLoggedIn } = useUser();
useEffect(() => {
if (isUserLoggedIn === false) {
@@ -48,8 +39,8 @@ export const AdminLayout: FC = observer((props) => {
- {children}
+ {children}
);
diff --git a/admin/lib/app-wrapper.tsx b/admin/lib/app-wrapper.tsx
deleted file mode 100644
index daf030a5c..000000000
--- a/admin/lib/app-wrapper.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-"use client";
-
-import { FC, ReactNode, useEffect, Suspense } from "react";
-import { observer } from "mobx-react-lite";
-import { SWRConfig } from "swr";
-// ui
-import { Toast } from "@plane/ui";
-// constants
-import { SWR_CONFIG } from "@/constants/swr-config";
-// helpers
-import { resolveGeneralTheme } from "@/helpers/common.helper";
-// hooks
-import { useTheme, useUser } from "@/hooks/store";
-
-interface IAppWrapper {
- children: ReactNode;
-}
-
-export const AppWrapper: FC