This commit is contained in:
8
src/components/themeController/clientThemeWrapper.tsx
Normal file
8
src/components/themeController/clientThemeWrapper.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
"use client";
|
||||
import { PropsWithChildren, useContext } from "react";
|
||||
import { ThemeContext } from "./themeContext";
|
||||
|
||||
export function ClientThemeWrapper({ children }: PropsWithChildren) {
|
||||
const { theme } = useContext(ThemeContext);
|
||||
return <div data-theme={theme} className="h-full">{children}</div>;
|
||||
}
|
||||
Reference in New Issue
Block a user