winner fix

This commit is contained in:
Kakabay 2024-12-27 21:20:13 +05:00
parent 39a53b8cb2
commit 007902bb6d
2 changed files with 4 additions and 4 deletions

View File

@ -3,13 +3,13 @@
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
interface IProps { interface IProps {
index: number;
phone: string; phone: string;
ticket: string; ticket: string;
isNew: boolean; isNew: boolean;
winnerNumber: number;
} }
const LotteryWinner = ({ index, phone, ticket, isNew }: IProps) => { const LotteryWinner = ({ phone, ticket, isNew, winnerNumber }: IProps) => {
return ( return (
<motion.div <motion.div
layout layout
@ -19,7 +19,7 @@ const LotteryWinner = ({ index, phone, ticket, isNew }: IProps) => {
transition={{ duration: 0.5 }} transition={{ duration: 0.5 }}
className="flex flex-col gap-2 md:pb-4 pb-3 border-b w-full border-[#CECCFF]"> className="flex flex-col gap-2 md:pb-4 pb-3 border-b w-full border-[#CECCFF]">
<h4 className="md:font-heading-6-regular text-[20px] leading-[28px]"> <h4 className="md:font-heading-6-regular text-[20px] leading-[28px]">
The winner of the {index + 1} stage: The winner of the {winnerNumber} stage:
</h4> </h4>
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<p className="font-base-medium">{phone}</p> <p className="font-base-medium">{phone}</p>

View File

@ -19,7 +19,7 @@ const LotteryWinnersList = ({ winners }: { winners: LotteryWinnerDataSimplified[
key={v4()} key={v4()}
phone={item.client} phone={item.client}
ticket={item.ticket} ticket={item.ticket}
index={index} winnerNumber={item.winner_no}
isNew={index === winners.length - 1} isNew={index === winners.length - 1}
/> />
))} ))}