From 0c80cf3d540a03d6cd38cd9dad627bed119585cb Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Wed, 22 May 2024 12:34:57 +0530 Subject: [PATCH] fix: enable toast in admin app. (#4545) --- admin/app/layout.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/app/layout.tsx b/admin/app/layout.tsx index 865eb23f9..e79d0bac8 100644 --- a/admin/app/layout.tsx +++ b/admin/app/layout.tsx @@ -1,12 +1,14 @@ "use client"; import { ReactNode } from "react"; -import { ThemeProvider } from "next-themes"; +import { ThemeProvider, useTheme } from "next-themes"; import { SWRConfig } from "swr"; +// ui +import { Toast } from "@plane/ui"; // constants import { SWR_CONFIG } from "@/constants/swr-config"; // helpers -import { ASSET_PREFIX } from "@/helpers/common.helper"; +import { ASSET_PREFIX, resolveGeneralTheme } from "@/helpers/common.helper"; // lib import { InstanceProvider } from "@/lib/instance-provider"; import { StoreProvider } from "@/lib/store-provider"; @@ -15,6 +17,9 @@ import { UserProvider } from "@/lib/user-provider"; import "./globals.css"; function RootLayout({ children }: { children: ReactNode }) { + // themes + const { resolvedTheme } = useTheme(); + return ( @@ -26,6 +31,7 @@ function RootLayout({ children }: { children: ReactNode }) { +