Files
THE-TIP-TOP/frontend/src/components/Footer.jsx
Andil 047d34f59b
All checks were successful
Tests / Backend - Tests passed: 8
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
fix: resolve frontend lint issues
2026-08-17 14:54:58 +00:00

247 lines
6.4 KiB
JavaScript

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
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"
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 && (
<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é
</FooterLink>
</li>
<li>
<FooterLink
to="/accessibilite"
pathname={pathname}
className="hover:text-white transition"
>
Accessibilité
</FooterLink>
</li>
<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"
>
01 84 80 20 34
</a>
<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" />
<span className="md:before:content-['_—_']">
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"
rel="noopener noreferrer"
className="hover:text-white transition"
>
Facebook
</a>
<a
href="https://www.instagram.com/thetiptop.gp4?igsh=MXZ3YzZ0d3dkazBpeg%3D%3D&utm_source=qr"
target="_blank"
rel="noopener noreferrer"
className="hover:text-white transition"
>
Instagram
</a>
<a
href="https://www.tiktok.com/@thetiptop4"
target="_blank"
rel="noopener noreferrer"
className="hover:text-white transition"
>
TikTok
</a>
</div>
</div>
</div>
</footer>
)
}