14 lines
329 B
TypeScript
14 lines
329 B
TypeScript
import { useLayoutEffect } from "react";
|
|
import { applyTheme, initializeTheme } from "../utils/apply.theme";
|
|
|
|
export const ThemeInitialProvider: React.FC<{ children: React.ReactNode }> = ({
|
|
children,
|
|
}) => {
|
|
useLayoutEffect(() => {
|
|
const theme = initializeTheme();
|
|
applyTheme(theme);
|
|
}, []);
|
|
|
|
return children;
|
|
};
|