File size: 456 Bytes
60faa09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | "use client";
import { SessionProvider } from "next-auth/react";
import { useEffect } from "react";
import config from "@/lib/config";
export function Providers({ children }) {
useEffect(() => {
if (typeof window !== "undefined") {
const theme = config?.theme || "slate-indigo";
document.documentElement.setAttribute("data-theme", theme);
}
}, []);
return (
<SessionProvider>
{children}
</SessionProvider>
);
}
|