fix: simplify mobile navigation

- Remove Inscription/Connexion buttons from hero on mobile
- Simplify Participer button on mobile menu (direct link instead of dropdown)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
soufiane 2025-12-05 14:08:17 +01:00
parent 923334a92c
commit 33b9b05e2f
2 changed files with 7 additions and 66 deletions

View File

@ -78,21 +78,6 @@ export default function HomePage() {
</div> </div>
</Link> </Link>
{/* Boutons Inscription/Connexion pour mobile (non-authentifié) */}
{!isAuthenticated && (
<div className="flex flex-row gap-3 mt-4 md:hidden">
<Link href={ROUTES.REGISTER}>
<button className="bg-white text-primary-600 font-bold text-base px-6 py-3 rounded-lg border-2 border-primary-500 shadow-md hover:bg-primary-50 transition-all">
Inscription
</button>
</Link>
<Link href={ROUTES.LOGIN}>
<button className="bg-primary-100 text-primary-700 font-bold text-base px-6 py-3 rounded-lg border-2 border-primary-300 shadow-md hover:bg-primary-200 transition-all">
Connexion
</button>
</Link>
</div>
)}
</div> </div>
</div> </div>
</div> </div>

View File

@ -256,57 +256,13 @@ export default function Header() {
</Link> </Link>
{/* Participer Mobile - Green Button */} {/* Participer Mobile - Green Button */}
{isAuthenticated ? (
<Link <Link
href={ROUTES.GAME} href={isAuthenticated ? ROUTES.GAME : ROUTES.REGISTER}
className="bg-primary-500 hover:bg-primary-600 text-white font-semibold px-4 py-3 rounded-lg transition-all hover:shadow-lg text-center block whitespace-nowrap" className="bg-primary-500 hover:bg-primary-600 text-white font-semibold px-4 py-3 rounded-lg transition-all hover:shadow-lg text-center block whitespace-nowrap"
onClick={() => setIsMobileMenuOpen(false)} onClick={() => setIsMobileMenuOpen(false)}
> >
Participer Participer
</Link> </Link>
) : (
<div>
<button
onClick={() => setIsParticiperDropdownOpen(!isParticiperDropdownOpen)}
className="bg-primary-500 hover:bg-primary-600 text-white font-semibold px-4 py-3 rounded-lg transition-all hover:shadow-lg flex items-center justify-center gap-2 w-full whitespace-nowrap"
>
Participer
<svg
className={`w-4 h-4 flex-shrink-0 transition-transform ${isParticiperDropdownOpen ? 'rotate-180' : ''}`}
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
</svg>
</button>
{isParticiperDropdownOpen && (
<div className="mt-2 space-y-2 animate-fadeIn bg-primary-50 rounded-lg p-3">
<Link
href={ROUTES.LOGIN}
onClick={() => {
setIsMobileMenuOpen(false);
setIsParticiperDropdownOpen(false);
}}
className="block text-primary-800 hover:text-primary-900 font-medium py-2 px-3 bg-white rounded-md hover:bg-primary-100 transition-colors"
>
Connexion
</Link>
<Link
href={ROUTES.REGISTER}
onClick={() => {
setIsMobileMenuOpen(false);
setIsParticiperDropdownOpen(false);
}}
className="block text-primary-800 hover:text-primary-900 font-medium py-2 px-3 bg-white rounded-md hover:bg-primary-100 transition-colors"
>
Inscription
</Link>
</div>
)}
</div>
)}
{isAuthenticated && ( {isAuthenticated && (
<div className="border-t border-beige-300 pt-3 mt-3 space-y-2"> <div className="border-t border-beige-300 pt-3 mt-3 space-y-2">