diff --git a/components/vote/ParticipantCard.tsx b/components/vote/ParticipantCard.tsx index 4ff22a8..724fc02 100644 --- a/components/vote/ParticipantCard.tsx +++ b/components/vote/ParticipantCard.tsx @@ -1,6 +1,8 @@ 'use client'; + import Image from 'next/image'; import placeholder from '@/public/person placeholder.svg'; +import clsx from 'clsx'; interface IProps { number: number; @@ -13,6 +15,7 @@ interface IProps { isFirst: boolean; voteStatus: string; winner: boolean; + hasUrl: boolean; } const ParticipantCard = ({ @@ -22,6 +25,7 @@ const ParticipantCard = ({ votes, progress, voteCode, + hasUrl, isFirst, voteStatus, winner, @@ -30,31 +34,35 @@ const ParticipantCard = ({ return winner && votes !== 0 ? ( ////////////////////////////////////////////// Winner card -
+

{number}

{photo && name ? ( // If there an image, show image -
+
{name}
) : ( // If there is no image, show placeholder -
+
{'placeholder'} @@ -64,7 +72,13 @@ const ParticipantCard = ({
{name ? ( -

+

{name}

) : null} @@ -73,7 +87,7 @@ const ParticipantCard = ({ {voteCode && voteStatus !== 'closed' ? ( // Desktop version

- Ses bermek üçin{' '} + Ses bermek üçin {voteCode} @@ -116,27 +130,31 @@ const ParticipantCard = ({

) : ( ////////////////////////////////////////////// Simple card -
+

{number}

{photo && name ? ( -
+
{name}
) : ( -
+
{'placeholder'} @@ -146,7 +164,10 @@ const ParticipantCard = ({
{name ? ( -

+

{name}

) : null} diff --git a/components/vote/ParticipantsList.tsx b/components/vote/ParticipantsList.tsx index 82d0e50..b8acc19 100644 --- a/components/vote/ParticipantsList.tsx +++ b/components/vote/ParticipantsList.tsx @@ -243,6 +243,7 @@ const ParticipantsList = ({ vote_id }: IParams) => { className="w-full"> { ) : ( { target="_blank" className="w-full mx-auto"> { ) : (