"use client";

import { useEffect } from "react";
import { useRouter } from "next/navigation";

const ROUTES = ["/academy", "/billboards", "/settings", "/explore"];

export default function BackgroundPrefetch() {
  const router = useRouter();

  useEffect(() => {
    const t = window.setTimeout(() => {
      ROUTES.forEach((route) => router.prefetch(route));
    }, 2000);
    return () => window.clearTimeout(t);
  }, [router]);

  return null;
}
