Merge remote-tracking branch 'origin/Alexis' into Emmanuel

This commit is contained in:
Emma781227
2026-07-23 15:12:15 +02:00
7 changed files with 76 additions and 45 deletions

View File

@@ -53,7 +53,7 @@ export default function MesGains() {
useEffect(() => { fetchGains() }, [fetchGains])
return (
<div className="min-h-screen bg-white max-w-sm mx-auto px-6 pt-6">
<div className="min-h-screen bg-gray-50 flex flex-col px-8 py-12 max-w-lg mx-auto">
<UserNav active="gains" />
<div className="flex items-center justify-between mb-4">

View File

@@ -60,7 +60,7 @@ export default function Profile() {
)
return (
<div className="min-h-screen bg-white max-w-sm mx-auto px-6 pt-6 pb-10">
<div className="min-h-screen bg-gray-50 flex flex-col px-8 py-12 max-w-lg mx-auto">
<UserNav active="profile" />
{/* Avatar */}

View File

@@ -1,6 +1,10 @@
import { Link } from 'react-router-dom'
import { useAuth } from '../context/AuthContext'
export default function ReglesJeu() {
const { user } = useAuth()
const isLoggedIn = !!user
return (
<div className="bg-green-50 min-h-screen">
@@ -79,12 +83,14 @@ export default function ReglesJeu() {
Inscrivez-vous, entrez votre code de ticket et retirez votre lot en magasin ou en ligne.
</p>
<div className="flex flex-col sm:flex-row justify-center gap-3 sm:gap-4">
<Link
to="/inscription"
className="bg-white text-green-700 px-6 sm:px-8 py-3 rounded-xl font-semibold hover:bg-green-50 text-sm sm:text-base"
>
Inscrivez-vous
</Link>
{!isLoggedIn && (
<Link
to="/inscription"
className="bg-white text-green-700 px-6 sm:px-8 py-3 rounded-xl font-semibold hover:bg-green-50 text-sm sm:text-base"
>
Inscrivez-vous
</Link>
)}
<Link
to="/saisir-code-unique"
className="border border-white px-6 sm:px-8 py-3 rounded-xl font-semibold hover:bg-green-800 text-sm sm:text-base"

View File

@@ -47,7 +47,7 @@ export default function SaisirCodeUnique() {
}
return (
<div className="min-h-screen bg-gray-50 flex flex-col px-8 py-12 max-w-sm mx-auto">
<div className="min-h-screen bg-gray-50 flex flex-col px-8 py-12 max-w-lg mx-auto">
<UserNav active="code" />
<div className="mb-8">

View File

@@ -1,4 +1,5 @@
import { Link } from 'react-router-dom'
import { useAuth} from '../context/AuthContext'
const sections = [
{
@@ -41,6 +42,11 @@ const sections = [
]
export default function Sitemap() {
const { user } = useAuth()
const isAdmin = user?.role === 'admin'
const visibleSections = sections.filter(
(section) => section.title !== 'Espaces professionnels' || isAdmin
)
return (
<main className="bg-green-50 min-h-screen px-4 sm:px-6 py-10 sm:py-16">
<div className="max-w-4xl mx-auto">
@@ -55,7 +61,7 @@ export default function Sitemap() {
</div>
<div className="grid sm:grid-cols-2 gap-6">
{sections.map((section) => (
{visibleSections.map((section) => (
<div key={section.title} className="bg-white rounded-2xl shadow p-5 sm:p-6">
<h2 className="text-base sm:text-lg font-bold text-green-700 mb-4 pb-2 border-b border-gray-100">
{section.title}