the-tip-top-frontend/components/GrandPrize.tsx
soufiane e0330d4f28 feat: add reset-password page and update contest dates
- Add reset-password page to handle password reset flow
- Fix forgot-password to call real API
- Update contest dates (validation: Dec 1-31, recovery: Dec 1 - Jan 31)
- Update draw date to Feb 1, 2026
- Improve GamePeriod and GrandPrize components design
- Remove "livré chez vous" text

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:15:30 +01:00

82 lines
4.0 KiB
XML

'use client';
interface GrandPrizeProps {
prizeAmount?: string;
drawDate?: Date;
}
export default function GrandPrize({
prizeAmount = "360€",
drawDate,
}: GrandPrizeProps) {
const formatDate = (date: Date) => {
return date.toLocaleDateString('fr-FR', {
day: 'numeric',
month: 'long',
year: 'numeric',
});
};
return (
<div className="bg-gradient-to-br from-[#fff8e8] via-[#fff4d9] to-[#ffefc4] rounded-3xl shadow-2xl p-10 md:p-12 border-3 border-[#d4a574] mt-10 hover:shadow-3xl transition-all duration-300">
<div className="flex flex-col items-center text-center">
{/* Icône trophée */}
<div className="bg-gradient-to-br from-[#d4a574] to-[#c4956a] rounded-full p-6 mb-6 shadow-xl">
<svg className="w-16 h-16 text-white" fill="currentColor" viewBox="0 0 20 20">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
</div>
{/* Titre */}
<h3 className="text-3xl md:text-4xl font-bold text-gray-900 mb-6">
Grand Prix à gagner !
</h3>
{/* Prix principal */}
<div className="bg-white/80 backdrop-blur-sm rounded-2xl px-8 py-6 mb-6 shadow-lg">
<p className="text-2xl md:text-3xl font-bold text-[#d4a574] mb-2">
1 an de thé offert
</p>
<p className="text-xl text-[#8b6f47] font-semibold">
d'une valeur de {prizeAmount}
</p>
</div>
{/* Description */}
<p className="text-lg md:text-xl text-[#5a5a4e] mb-8 max-w-2xl leading-relaxed">
Le grand prix du tirage final : une année complète de thé premium
</p>
{/* Informations du tirage */}
<div className="grid md:grid-cols-2 gap-4 w-full max-w-xl">
{drawDate && (
<div className="bg-white/70 backdrop-blur-sm rounded-2xl p-5 flex items-center gap-4 shadow-md">
<div className="bg-[#d4a574]/20 rounded-full p-3">
<svg className="w-6 h-6 text-[#d4a574]" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z" clipRule="evenodd" />
</svg>
</div>
<div className="text-left">
<p className="text-sm text-[#8a8a7a] font-medium">Tirage au sort</p>
<p className="text-lg font-bold text-[#5a5a4e]">{formatDate(drawDate)}</p>
</div>
</div>
)}
<div className="bg-white/70 backdrop-blur-sm rounded-2xl p-5 flex items-center gap-4 shadow-md">
<div className="bg-[#d4a574]/20 rounded-full p-3">
<svg className="w-6 h-6 text-[#d4a574]" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
</svg>
</div>
<div className="text-left">
<p className="text-sm text-[#8a8a7a] font-medium">Certification</p>
<p className="text-lg font-bold text-[#5a5a4e]">Contrôle d'huissier</p>
</div>
</div>
</div>
</div>
</div>
);
}