import { Outlet, useLocation } from "react-router";
import NavMenu from "./NavMenu";
import { useEffect } from "react";

function LayoutWithoutFooter() {
  const location = useLocation();

  useEffect(() => {
    window.scrollTo(0, 0);
  }, [location.pathname]);

  return (
    <div className="min-h-dvh bg-[#F7F6F3] overflow-hidden">
      <NavMenu />
      <main className="h-dvh overflow-hidden">
        <Outlet />
      </main>
    </div>
  );
}

export default LayoutWithoutFooter;
