From f4ab75fd307f0388c0c6fd9d8936c2a44b004b66 Mon Sep 17 00:00:00 2001 From: Lumither Tao Date: Sun, 13 Oct 2024 00:58:48 -0700 Subject: [PATCH] fix(layout provider) fix theme --- app/toastify-provider.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/toastify-provider.tsx b/app/toastify-provider.tsx index 0607d53..91347a0 100644 --- a/app/toastify-provider.tsx +++ b/app/toastify-provider.tsx @@ -4,12 +4,14 @@ import 'react-toastify/dist/ReactToastify.css'; // import '../../app/globals.css'; import { ToastContainer } from 'react-toastify'; import React from 'react'; +import { useTheme } from 'next-themes'; interface ToastProviderProps { children: React.ReactNode; } export default function ToastProvider({ children }: ToastProviderProps) { + const { theme } = useTheme(); return ( <> @@ -24,7 +26,7 @@ export default function ToastProvider({ children }: ToastProviderProps) { pauseOnFocusLoss draggable pauseOnHover - theme="dark" + theme={ theme } /> );