Files
Frontend/src/modules/theme-changer/provider/theme.initial.provider.tsx
T
2026-06-12 01:23:31 +03:00

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;
};