import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./App";
import "./styles/global.css";

function scheduleFontLoad() {
	const load = () => {
		void import("./styles/fonts.css");
	};
	if (typeof window.requestIdleCallback === "function") {
		window.requestIdleCallback(load);
	} else {
		setTimeout(load, 200);
	}
}

scheduleFontLoad();

createRoot(document.getElementById("root")!).render(
	<StrictMode>
		<App />
	</StrictMode>,
);
