From f306a7c3d27a720897c4544ccbbe163682370b20 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Mon, 30 Sep 2024 14:30:43 +0330 Subject: [PATCH] fix bug window --- app/Providers.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Providers.js b/app/Providers.js index da9955f..8313164 100644 --- a/app/Providers.js +++ b/app/Providers.js @@ -1,13 +1,14 @@ "use client"; import { ThemeProvider } from "next-themes"; +import { usePathname } from "next/navigation"; export function Providers({ children }) { - const isDark = window.location.pathname.includes("/panel"); + const router = usePathname(); return (