finish footer
This commit is contained in:
@@ -3,12 +3,10 @@ import {Link} from "react-router";
|
|||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import Modal from "../ui/modal/modal.jsx";
|
import Modal from "../ui/modal/modal.jsx";
|
||||||
import Button from "../ui/button/button.jsx";
|
import Button from "../ui/button/button.jsx";
|
||||||
|
import scrollToTop from "../../utils/scrollToTop.js";
|
||||||
|
|
||||||
export default function Footer(){
|
export default function Footer(){
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const scrollToTop = () => {
|
|
||||||
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
|
|
||||||
};
|
|
||||||
const [isCopyrightModal, setIsCopyrightModal] = useState(false);
|
const [isCopyrightModal, setIsCopyrightModal] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
@@ -28,11 +26,11 @@ export default function Footer(){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav className={styles.footerNav}>
|
<nav className={styles.footerNav}>
|
||||||
<Link to="/RGPD" className={styles.link}>
|
<Link to="/RGPD" className={styles.link} onClick={scrollToTop}>
|
||||||
Fiche RGPD
|
Fiche RGPD
|
||||||
</Link>
|
</Link>
|
||||||
<span className={styles.separator}></span>
|
<span className={styles.separator}></span>
|
||||||
<Link to="/legalNotices" className={styles.link}>
|
<Link to="/legalNotices" className={styles.link} onClick={scrollToTop}>
|
||||||
Mentions légales
|
Mentions légales
|
||||||
</Link>
|
</Link>
|
||||||
<span className={styles.separator}></span>
|
<span className={styles.separator}></span>
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export default function scrollToTop () {
|
||||||
|
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user