import { useEffect } from "react";
import { useRouter } from "expo-router";

// Redirect the root route to the onboarding flow on app start.
export default function IndexRedirect() {
  const router = useRouter();
  useEffect(() => {
    // Use replace so the welcome route doesn't remain in the navigation stack.
    router.replace("/(auth)/onboarding");
  }, [router]);

  // Nothing to render here while we redirect.
  return null;
}
