Show international lotteries with their bonus balls
LokiLab's feed now carries US, French and EuroMillions results with a bonus array (Powerball, N° Chance, étoiles). Bonus balls render after a "+" in gold; the lottery strip gets icons for the new games. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9996f7b823
commit
302915d888
@@ -12,7 +12,7 @@ export function DrawTimeline({ entry }: { entry: LotteryFeedEntry }) {
|
||||
className="flex flex-wrap items-center gap-3 rounded-md border border-border/60 bg-panel px-3 py-2"
|
||||
>
|
||||
<span className="w-20 shrink-0 text-xs text-muted-foreground tabular-nums">{draw.date}</span>
|
||||
<NumberSequence numbers={draw.result} />
|
||||
<NumberSequence numbers={draw.result} bonus={draw.bonus} bonusLabel={entry.bonusLabel} />
|
||||
{draw.pick && (
|
||||
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
||||
Choix:
|
||||
|
||||
@@ -52,7 +52,7 @@ export function LotteryMobileCard({
|
||||
<p className="mb-1 text-xs text-muted-foreground">
|
||||
Résultat du {formatDate(lastDraw.date)}
|
||||
</p>
|
||||
<NumberSequence numbers={lastDraw.result} />
|
||||
<NumberSequence numbers={lastDraw.result} bonus={lastDraw.bonus} bonusLabel={entry.bonusLabel} />
|
||||
</div>
|
||||
{lastDraw.pick ? (
|
||||
<div>
|
||||
|
||||
@@ -44,7 +44,7 @@ export function LotteryRow({
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div>{lastDraw ? <NumberSequence numbers={lastDraw.result} /> : <Dash />}</div>
|
||||
<div>{lastDraw ? <NumberSequence numbers={lastDraw.result} bonus={lastDraw.bonus} bonusLabel={entry.bonusLabel} /> : <Dash />}</div>
|
||||
|
||||
<div>
|
||||
{lastDraw?.pick ? (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Link from "next/link"
|
||||
import { Clover, Crown, Dices, Gem, LayoutGrid, type LucideIcon } from "lucide-react"
|
||||
import { Clover, Crown, Dices, Gem, LayoutGrid, Sparkles, Star, Zap, type LucideIcon } from "lucide-react"
|
||||
import { cn } from "@/lib/utils"
|
||||
import type { LotteryFeedEntry } from "@/lib/lokilab-feed"
|
||||
|
||||
@@ -7,6 +7,10 @@ const ICONS: Record<string, LucideIcon> = {
|
||||
"lotto-max": Crown,
|
||||
"lotto-649": Clover,
|
||||
"daily-grand": Gem,
|
||||
powerball: Zap,
|
||||
"mega-millions": Star,
|
||||
"fr-loto": Clover,
|
||||
euromillions: Sparkles,
|
||||
}
|
||||
|
||||
/** Horizontal icon strip under the header — the 1xbet sports-strip pattern, one tile per lottery. */
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
export function NumberSequence({
|
||||
numbers,
|
||||
bonus,
|
||||
bonusLabel,
|
||||
hitSet,
|
||||
}: {
|
||||
numbers: number[]
|
||||
bonus?: number[]
|
||||
bonusLabel?: string
|
||||
hitSet?: Set<number>
|
||||
}) {
|
||||
return (
|
||||
@@ -12,14 +16,26 @@ export function NumberSequence({
|
||||
key={i}
|
||||
className={
|
||||
"flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-[13px] font-semibold tabular-nums " +
|
||||
(hitSet?.has(n)
|
||||
? "bg-success text-success-foreground"
|
||||
: "bg-muted text-foreground")
|
||||
(hitSet?.has(n) ? "bg-success text-success-foreground" : "bg-muted text-foreground")
|
||||
}
|
||||
>
|
||||
{n}
|
||||
</span>
|
||||
))}
|
||||
{bonus && bonus.length > 0 && (
|
||||
<>
|
||||
<span aria-hidden className="px-0.5 text-xs text-muted-foreground">+</span>
|
||||
{bonus.map((n, i) => (
|
||||
<span
|
||||
key={`b${i}`}
|
||||
title={bonusLabel}
|
||||
className="flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-gold text-[13px] font-bold tabular-nums text-primary-foreground"
|
||||
>
|
||||
{n}
|
||||
</span>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user