import Link from "next/link" import { NumberSequence } from "@/components/number-sequence" import { FollowButton } from "@/components/follow-button" import type { LotteryFeedEntry } from "@/lib/lokilab-feed" export function LotteryMobileCard({ entry, country, isFollowing, isAuthenticated, }: { entry: LotteryFeedEntry country: string isFollowing: boolean isAuthenticated: boolean }) { const { lifetime, lastDraw } = entry const resultSet = new Set(lastDraw?.result ?? []) return (

{lastDraw && ( )} {entry.name}

{lifetime.picksTracked > 0 ? (

{(lifetime.winRate * 100).toFixed(0)}% {" "} sur {lifetime.picksTracked}

) : (

Nouveau

)}
{lastDraw ? ( <>

Résultat du {formatDate(lastDraw.date)}

{lastDraw.pick ? (

Choix pour ce tirage —{" "} {lastDraw.matched} / {lastDraw.result.length}

) : (

Aucun choix pour ce tirage.

)} ) : (

Aucun tirage disponible.

)}
) } function formatDate(iso: string): string { const d = new Date(iso + "T00:00:00") return d.toLocaleDateString("fr-CA", { day: "numeric", month: "short" }) }