- Create TeaIconsBackground component for animated tea icons background - Refactor page.tsx to use TeaIconsBackground and PrizeCard components - Refactor login/page.tsx to use TeaIconsBackground - Refactor register/page.tsx to use TeaIconsBackground - Delete obsolete page.tsx.backup file - Significant reduction in code duplication across auth pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
185 lines
9.1 KiB
TypeScript
185 lines
9.1 KiB
TypeScript
'use client';
|
|
|
|
import Link from "next/link";
|
|
import Button from "@/components/Button";
|
|
import CountdownTimer from "@/components/CountdownTimer";
|
|
import GamePeriod from "@/components/GamePeriod";
|
|
import GrandPrize from "@/components/GrandPrize";
|
|
import AboutContest from "@/components/AboutContest";
|
|
import TeaIconsBackground from "@/components/TeaIconsBackground";
|
|
import { PrizeCard } from "@/components/ui";
|
|
import { useState } from "react";
|
|
import { useAuth } from "@/contexts/AuthContext";
|
|
import { ROUTES } from "@/utils/constants";
|
|
|
|
const HOME_PRIZES = [
|
|
{ imageSrc: "/images/lots/infuseur.png", imageAlt: "Infuseur à thé premium", badge: "60%", title: "Infuseur à thé premium", description: "Un infuseur en acier inoxydable de haute qualité pour ressortir les arômes de vos thés en vrac" },
|
|
{ imageSrc: "/images/lots/the-detox.png", imageAlt: "Boîte 100g thé détox", badge: "20%", title: "Boîte 100g thé détox", description: "Mélange détox aux plantes bio" },
|
|
{ imageSrc: "/images/lots/the-signature.png", imageAlt: "Boîte 100g thé signature", badge: "10%", title: "Boîte 100g thé signature", description: "Notre mélange signature exclusif" },
|
|
{ imageSrc: "/images/lots/coffret-39.png", imageAlt: "Coffret découverte 39€", badge: "6%", title: "Coffret découverte 39€", description: "Sélection de nos meilleurs thés" },
|
|
{ imageSrc: "/images/lots/coffret-69.jpg", imageAlt: "Coffret prestige 69€", badge: "4%", title: "Coffret prestige 69€", description: "Une expérience complète" },
|
|
{ imageSrc: "/images/lots/grand-prix.png", imageAlt: "Grand prix - 1 an de thé", badge: "1 an de THÉ", title: "Tirage Final", description: "Livraison mensuelle pendant 12 mois", isGrandPrix: true },
|
|
];
|
|
|
|
export default function HomePage() {
|
|
const [animationKey] = useState(Date.now());
|
|
const { isAuthenticated } = useAuth();
|
|
|
|
return (
|
|
<div className="min-h-screen -mt-[4.5rem] relative">
|
|
<TeaIconsBackground animationKey={animationKey} />
|
|
|
|
{/* Hero Section - Bannière principale */}
|
|
<section className="relative min-h-[600px] pt-32 pb-24 overflow-hidden">
|
|
|
|
<div className="w-full relative z-10">
|
|
<div className="w-full text-center px-4">
|
|
<h1 className="text-5xl md:text-7xl font-bold text-[#5a5a4e] mb-6 leading-tight drop-shadow-sm">
|
|
Jeu Concours Thé Tip Top<br />
|
|
<span className="text-[#d4a574]">Nice</span>
|
|
</h1>
|
|
<p className="text-xl md:text-2xl text-[#6a6a5e] mb-8 leading-relaxed max-w-4xl mx-auto">
|
|
À l'occasion de l'ouverture de notre 10<sup>ème</sup> boutique de thé premium à Nice,<br />
|
|
participez à notre concours et gagnez des thés et accessoires exclusifs !
|
|
</p>
|
|
|
|
<div className="flex flex-col sm:flex-row gap-4 justify-center px-4">
|
|
<Link href={isAuthenticated ? ROUTES.GAME : "/register"}>
|
|
<button className="bg-[#d4a574] hover:bg-[#c4956a] text-white font-bold text-lg px-12 py-5 rounded-full shadow-2xl transition-all w-full sm:w-auto hover:scale-105">
|
|
Jouer maintenant
|
|
</button>
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{/* Game Period & Countdown Section */}
|
|
<section className="py-20 bg-transparent">
|
|
<div className="container mx-auto px-4">
|
|
<div className="max-w-6xl mx-auto">
|
|
{/* Countdown Timer */}
|
|
<CountdownTimer
|
|
endDate={new Date('2025-12-31T23:59:59')}
|
|
title="Fin du concours dans"
|
|
/>
|
|
|
|
{/* Game Period Cards */}
|
|
<GamePeriod />
|
|
|
|
{/* Grand Prize Banner */}
|
|
<GrandPrize
|
|
prizeAmount="360€"
|
|
drawDate={new Date('2026-01-15')}
|
|
participantsCount={15420}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{/* About Contest Section */}
|
|
<AboutContest />
|
|
|
|
{/* How to Participate Section */}
|
|
<section className="py-20 bg-white/60 backdrop-blur-sm">
|
|
<div className="container mx-auto px-4">
|
|
<div className="max-w-5xl mx-auto">
|
|
<h2 className="text-4xl md:text-5xl font-bold text-center text-gray-900 mb-4">
|
|
Comment participer?
|
|
</h2>
|
|
<p className="text-center text-gray-600 mb-16 text-lg max-w-2xl mx-auto">
|
|
3 étapes simples pour découvrir votre lot et rejoindre nos milliers de gagnants
|
|
</p>
|
|
|
|
<div className="grid md:grid-cols-3 gap-12">
|
|
{/* Step 1 */}
|
|
<div className="text-center relative">
|
|
<div className="absolute top-0 right-0 w-8 h-8 bg-[#1a4d2e] text-white rounded-full flex items-center justify-center font-bold text-sm">
|
|
1
|
|
</div>
|
|
<div className="bg-gradient-to-br from-[#fef3c7] to-[#fde68a] w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg">
|
|
<svg className="w-10 h-10 text-[#1a4d2e]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
|
|
</svg>
|
|
</div>
|
|
<h3 className="text-2xl font-bold mb-3 text-gray-900">Inscrivez-vous</h3>
|
|
<p className="text-gray-600 leading-relaxed">
|
|
Créez votre compte rapidement avec Google, Facebook ou votre email
|
|
</p>
|
|
</div>
|
|
|
|
{/* Step 2 */}
|
|
<div className="text-center relative">
|
|
<div className="absolute top-0 right-0 w-8 h-8 bg-[#1a4d2e] text-white rounded-full flex items-center justify-center font-bold text-sm">
|
|
2
|
|
</div>
|
|
<div className="bg-gradient-to-br from-[#fef3c7] to-[#fde68a] w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg">
|
|
<svg className="w-10 h-10 text-[#1a4d2e]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z" />
|
|
</svg>
|
|
</div>
|
|
<h3 className="text-2xl font-bold mb-3 text-gray-900">Entrez votre code</h3>
|
|
<p className="text-gray-600 leading-relaxed">
|
|
Saisissez le code à 10 caractères de votre ticket d'achat à 49€
|
|
</p>
|
|
</div>
|
|
|
|
{/* Step 3 */}
|
|
<div className="text-center relative">
|
|
<div className="absolute top-0 right-0 w-8 h-8 bg-[#1a4d2e] text-white rounded-full flex items-center justify-center font-bold text-sm">
|
|
3
|
|
</div>
|
|
<div className="bg-gradient-to-br from-[#fef3c7] to-[#fde68a] w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg">
|
|
<svg className="w-10 h-10 text-[#1a4d2e]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7" />
|
|
</svg>
|
|
</div>
|
|
<h3 className="text-2xl font-bold mb-3 text-gray-900">Découvrez votre lot</h3>
|
|
<p className="text-gray-600 leading-relaxed">
|
|
Résultat immédiat ! 100% des participants remportent un prix
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{/* Prizes Section */}
|
|
<section className="py-20 bg-transparent">
|
|
<div className="container mx-auto px-4">
|
|
<div className="max-w-6xl mx-auto">
|
|
<h2 className="text-4xl md:text-5xl font-bold text-center text-gray-900 mb-4">
|
|
Lots à gagner
|
|
</h2>
|
|
<p className="text-center text-gray-600 mb-16 text-lg max-w-3xl mx-auto">
|
|
Découvrez nos magnifiques prix, des accessoires premium aux coffrets exclusifs
|
|
</p>
|
|
|
|
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
{HOME_PRIZES.map((prize, index) => (
|
|
<PrizeCard key={index} {...prize} />
|
|
))}
|
|
</div>
|
|
|
|
<div className="text-center mt-12">
|
|
<Link href="/lots">
|
|
<Button
|
|
variant="outline"
|
|
size="lg"
|
|
className="border-2 border-[#1a4d2e] text-[#1a4d2e] hover:bg-[#1a4d2e] hover:text-white font-semibold px-8"
|
|
>
|
|
Voir tous les lots
|
|
<svg className="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
|
|
</svg>
|
|
</Button>
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
</div>
|
|
);
|
|
}
|