commit
This commit is contained in:
parent
6545b772ed
commit
3e87c57213
|
|
@ -236,6 +236,7 @@ const ParticipantsList = ({ vote_id }: IParams) => {
|
||||||
<div className="flex flex-col items-center overflow-hidden bg-fillNavyBlue rounded-[10px] sm:rounded-[30px] max-w-[940px] w-full px-[5px] py-[20px] sm:p-[20px] sm:gap-[20px] gap-[10px]">
|
<div className="flex flex-col items-center overflow-hidden bg-fillNavyBlue rounded-[10px] sm:rounded-[30px] max-w-[940px] w-full px-[5px] py-[20px] sm:p-[20px] sm:gap-[20px] gap-[10px]">
|
||||||
{participantsData.map((participant, id) =>
|
{participantsData.map((participant, id) =>
|
||||||
participant.votes_count === participantsData[0].votes_count ? (
|
participant.votes_count === participantsData[0].votes_count ? (
|
||||||
|
participant.url ? (
|
||||||
<Link
|
<Link
|
||||||
href={participant.url ? participant.url : ''}
|
href={participant.url ? participant.url : ''}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|
@ -254,6 +255,21 @@ const ParticipantsList = ({ vote_id }: IParams) => {
|
||||||
winner={true}
|
winner={true}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
|
) : (
|
||||||
|
<ParticipantCard
|
||||||
|
key={v4()}
|
||||||
|
voteStatus={voteStatus ? voteStatus : ''}
|
||||||
|
isFirst={id === 0 ? true : false}
|
||||||
|
name={participant.title}
|
||||||
|
progress={participant.votes_percents}
|
||||||
|
votes={participant.votes_count}
|
||||||
|
voteCode={participant.vote_code}
|
||||||
|
number={id + 1}
|
||||||
|
photo={participant.photo}
|
||||||
|
smsNumber={data.data.sms_number}
|
||||||
|
winner={true}
|
||||||
|
/>
|
||||||
|
)
|
||||||
) : null,
|
) : null,
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -261,9 +277,15 @@ const ParticipantsList = ({ vote_id }: IParams) => {
|
||||||
|
|
||||||
{winnersCount > 1 ? <div className="w-full h-[1px] bg-[#3636A3]"></div> : null}
|
{winnersCount > 1 ? <div className="w-full h-[1px] bg-[#3636A3]"></div> : null}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-col items-center max-w-[940px] w-full gap-5 justify-center mx-auto">
|
||||||
{participantsData
|
{participantsData
|
||||||
? participantsData.map((participant, id) =>
|
? participantsData.map((participant, id) =>
|
||||||
participant.id !== participantsData[0].id && voteStatus ? (
|
participant.id !== participantsData[0].id && voteStatus ? (
|
||||||
|
participant.url ? (
|
||||||
|
<Link
|
||||||
|
href={participant.url ? participant.url : ''}
|
||||||
|
target="_blank"
|
||||||
|
className="w-full mx-auto">
|
||||||
<ParticipantCard
|
<ParticipantCard
|
||||||
key={v4()}
|
key={v4()}
|
||||||
voteStatus={voteStatus}
|
voteStatus={voteStatus}
|
||||||
|
|
@ -277,11 +299,28 @@ const ParticipantsList = ({ vote_id }: IParams) => {
|
||||||
smsNumber={data.data.sms_number}
|
smsNumber={data.data.sms_number}
|
||||||
winner={false}
|
winner={false}
|
||||||
/>
|
/>
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<ParticipantCard
|
||||||
|
key={v4()}
|
||||||
|
voteStatus={voteStatus}
|
||||||
|
isFirst={id === 0 ? true : false}
|
||||||
|
name={participant.title}
|
||||||
|
progress={participant.votes_percents}
|
||||||
|
votes={participant.votes_count}
|
||||||
|
voteCode={participant.vote_code}
|
||||||
|
number={id + 1}
|
||||||
|
photo={participant.photo}
|
||||||
|
smsNumber={data.data.sms_number}
|
||||||
|
winner={false}
|
||||||
|
/>
|
||||||
|
)
|
||||||
) : null,
|
) : null,
|
||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue