From 89a8ef87bb9a37f5749ae529ba12060caa004e78 Mon Sep 17 00:00:00 2001 From: Giovanni-Josserand Date: Tue, 13 Jan 2026 20:14:50 +0100 Subject: [PATCH] finish footer --- src/components/Footer/Footer.jsx | 8 +++----- src/utils/scrollToTop.js | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 src/utils/scrollToTop.js diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index f4fe30a..4906ceb 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -3,12 +3,10 @@ import {Link} from "react-router"; import {useState} from "react"; import Modal from "../ui/modal/modal.jsx"; import Button from "../ui/button/button.jsx"; +import scrollToTop from "../../utils/scrollToTop.js"; export default function Footer(){ const currentYear = new Date().getFullYear(); - const scrollToTop = () => { - window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }); - }; const [isCopyrightModal, setIsCopyrightModal] = useState(false); @@ -28,11 +26,11 @@ export default function Footer(){