"use client";

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

export default function ScrollToTop() {
  const pathname = usePathname();

  useEffect(() => {
    window.scrollTo(0, 0);
  }, [pathname]); // Trigger scroll to top on every path change

  return null;
}
