Download src/app/providers.js from NeoPy/hugging-c-ai: direct link, hf CLI and curl.
- Browser
- Download file 456 Bytes
-
https://huggingface.co/NeoPy/hugging-c-ai/resolve/main/src/app/providers.js
- Command line
-
hf download hf://NeoPy/hugging-c-ai/src/app/providers.js
-
curl -L -o providers.js https://huggingface.co/NeoPy/hugging-c-ai/resolve/main/src/app/providers.js
456 Bytes
| "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> | |
| ); | |
| } | |