diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx index a5f71b4..b98832e 100644 --- a/src/components/Layout/Layout.tsx +++ b/src/components/Layout/Layout.tsx @@ -3,6 +3,7 @@ import Modal from "react-modal"; import { Outlet, useLocation } from "react-router-dom"; import { Footer } from "@components/Footer/Footer.tsx"; import { Header } from "@components/Header/Header.tsx"; +import { useScrollToTop } from "@utils/hooks/useScrollToTop"; export function Layout() { const location = useLocation(); @@ -10,10 +11,12 @@ export function Layout() { Modal.setAppElement("#root"); }, []); + useScrollToTop(); + return ( <>
-
+
{location && location.pathname !== "/" &&