winner fix
This commit is contained in:
parent
39a53b8cb2
commit
007902bb6d
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue