import { SplashScreen } from "expo-router";
import { useInitializeApp } from "@/hooks/auth";
import { useFonts } from "expo-font";

export function SplashScreenController() {
  const { isLoading } = useInitializeApp();

  const [loaded] = useFonts({
    SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
  });

  if (!isLoading && loaded) {
    SplashScreen.hideAsync();
  }

  return null;
}
