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