fix: resolve frontend lint issues
This commit is contained in:
@@ -1,125 +1,119 @@
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { useAuth } from '../context/AuthContext'
|
||||
|
||||
|
||||
function FooterLink({ to, children, className = '', pathname }) {
|
||||
return pathname === to ? (
|
||||
<span className={className}>{children}</span>
|
||||
) : (
|
||||
<Link to={to} className={className}>
|
||||
{children}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
export default function Footer() {
|
||||
const { pathname } = useLocation()
|
||||
const { user } = useAuth()
|
||||
const isLoggedIn = !!user
|
||||
|
||||
function FooterLink({ to, children, className=''}) {
|
||||
return pathname === to ? (
|
||||
<span className={className}>{children}</span>
|
||||
) : (
|
||||
<Link to={to} className={className}>
|
||||
{children}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<footer className="bg-[#006B6B] text-white">
|
||||
|
||||
|
||||
|
||||
{/* Partie principale */}
|
||||
<div className="max-w-7xl mx-auto px-6 py-10 grid grid-cols-2 md:grid-cols-4 gap-8">
|
||||
|
||||
|
||||
|
||||
{/* Logo */}
|
||||
<div>
|
||||
<FooterLink to='/accueil'>
|
||||
<FooterLink
|
||||
to="/accueil"
|
||||
pathname={pathname}
|
||||
>
|
||||
<h3 className="text-xl font-bold mb-3">
|
||||
Thé Tip Top
|
||||
</h3>
|
||||
</FooterLink>
|
||||
|
||||
|
||||
<p className="text-teal-100 text-sm leading-relaxed">
|
||||
Participez au jeu-concours Thé Tip Top et tentez de gagner
|
||||
des lots gourmands autour du thé.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Navigation */}
|
||||
<div>
|
||||
|
||||
<h3 className="text-lg font-semibold mb-5">
|
||||
Navigation
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<ul className="space-y-3 text-teal-100">
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/accueil"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Accueil
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/regles-jeu"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Règles du jeu
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/saisir-code-unique"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Tester mon code
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
{ !isLoggedIn && (
|
||||
|
||||
{!isLoggedIn && (
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/inscription"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Créer un compte
|
||||
</FooterLink>
|
||||
</li>
|
||||
)}
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Informations légales */}
|
||||
<div>
|
||||
|
||||
<h3 className="text-lg font-semibold mb-5">
|
||||
Informations
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
<ul className="space-y-3 text-teal-100">
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/mentions-legales"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Mentions légales
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/confidentialite"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Politique de confidentialité
|
||||
@@ -129,6 +123,7 @@ export default function Footer() {
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/accessibilite"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Accessibilité
|
||||
@@ -138,78 +133,73 @@ export default function Footer() {
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/cgu"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
CGU
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/contact"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Contact
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<FooterLink
|
||||
to="/sitemap"
|
||||
pathname={pathname}
|
||||
className="hover:text-white transition"
|
||||
>
|
||||
Plan du site
|
||||
</FooterLink>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Contact */}
|
||||
<div>
|
||||
|
||||
<h3 className="text-lg font-semibold mb-5">
|
||||
Contact
|
||||
</h3>
|
||||
|
||||
|
||||
<p className="text-teal-100 text-sm mb-3">
|
||||
Une question sur le jeu ?
|
||||
</p>
|
||||
|
||||
<a href="tel:+33184802034" className="block mt-2 font-medium hover:text-teal-300">
|
||||
|
||||
<a
|
||||
href="tel:+33184802034"
|
||||
className="block mt-2 font-medium hover:text-teal-300"
|
||||
>
|
||||
01 84 80 20 34
|
||||
</a>
|
||||
|
||||
<a href="mailto:contact@thetiptop.fr" className="inline-block mt-3 font-medium hover:text-teal-300">
|
||||
|
||||
<a
|
||||
href="mailto:contact@thetiptop.fr"
|
||||
className="inline-block mt-3 font-medium hover:text-teal-300"
|
||||
>
|
||||
contact@thetiptop.fr
|
||||
</a>
|
||||
|
||||
|
||||
<p className="text-teal-100 text-sm mt-2">
|
||||
18 rue Léon Frot
|
||||
<br />
|
||||
75011 Paris, France
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{/* Barre basse */}
|
||||
|
||||
<div className="border-t border-teal-800">
|
||||
|
||||
<div className="max-w-7xl mx-auto px-6 py-5 flex flex-col md:flex-row justify-between items-center gap-3">
|
||||
|
||||
|
||||
|
||||
<p className="text-teal-200 text-sm text-center md:text-left">
|
||||
© {new Date().getFullYear()} Thé Tip Top. Tous droits réservés.
|
||||
<br className="md:hidden" />
|
||||
@@ -217,8 +207,9 @@ export default function Footer() {
|
||||
Projet étudiant fictif — aucun achat ni réservation réel ne peut être effectué sur ce site.
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
||||
<div className="flex gap-5 text-sm text-teal-200">
|
||||
|
||||
<a
|
||||
href="https://www.facebook.com/profile.php?id=61590449280854"
|
||||
target="_blank"
|
||||
@@ -227,8 +218,7 @@ export default function Footer() {
|
||||
>
|
||||
Facebook
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<a
|
||||
href="https://www.instagram.com/thetiptop.gp4?igsh=MXZ3YzZ0d3dkazBpeg%3D%3D&utm_source=qr"
|
||||
target="_blank"
|
||||
@@ -237,8 +227,7 @@ export default function Footer() {
|
||||
>
|
||||
Instagram
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<a
|
||||
href="https://www.tiktok.com/@thetiptop4"
|
||||
target="_blank"
|
||||
@@ -247,15 +236,11 @@ export default function Footer() {
|
||||
>
|
||||
TikTok
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user