the-tip-top-frontend/components/ui/TicketTableRow.tsx
soufiane 618b689091 fix: amélioration accessibilité WAVE - corrections multiples
- Ajout h2 sr-only dans Footer, login, register, forgot-password pour hiérarchie titres
- Correction contraste TicketTableRow (text-gray-700)
- Correction contraste StatusBadge (couleurs -900)
- Correction contraste page jeux (text-gray-700)
- Correction labels orphelins page profil (label → span)
- Mise à jour FAQContent

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 15:06:30 +01:00

61 lines
1.8 KiB
TypeScript

'use client';
import React from 'react';
import { StatusBadge } from '@/components/ui/StatusBadge';
import { TicketPrizeDisplay } from '@/components/ui/TicketPrizeDisplay';
import { Ticket } from '@/types';
interface TicketTableRowProps {
ticket: Ticket;
showClaimedDate?: boolean;
}
export const TicketTableRow: React.FC<TicketTableRowProps> = ({
ticket,
showClaimedDate = false,
}) => {
return (
<tr className="hover:bg-gradient-to-r hover:from-[#d4a574]/5 hover:to-[#c4956a]/5 transition-colors">
<td className="px-6 py-4 whitespace-nowrap">
<span className="font-mono text-sm font-semibold text-[#5a5a4e]">
{ticket.code}
</span>
</td>
<td className="px-6 py-4">
{ticket.prize && (
<TicketPrizeDisplay prizeType={ticket.prize.type} />
)}
</td>
<td className="px-6 py-4 whitespace-nowrap">
<StatusBadge type="ticket" value={ticket.status} />
</td>
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-700">
{ticket.playedAt
? new Date(ticket.playedAt).toLocaleDateString("fr-FR", showClaimedDate ? {
day: 'numeric',
month: 'long',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
} : undefined)
: "-"}
</td>
{showClaimedDate && (
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-700">
{ticket.claimedAt
? new Date(ticket.claimedAt).toLocaleDateString("fr-FR", {
day: 'numeric',
month: 'long',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
})
: "-"}
</td>
)}
</tr>
);
};
export default TicketTableRow;