From d135a153a47d2089f264ee6a0a75a260b27ccaff Mon Sep 17 00:00:00 2001 From: Arend Peter Date: Sun, 5 Jan 2025 15:35:07 -0800 Subject: [PATCH] Add quick candidate urls --- .../Election/Voting/GenericBallotView/CandidateLabel.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/Election/Voting/GenericBallotView/CandidateLabel.tsx b/packages/frontend/src/components/Election/Voting/GenericBallotView/CandidateLabel.tsx index 6d34faca..d5ff7703 100644 --- a/packages/frontend/src/components/Election/Voting/GenericBallotView/CandidateLabel.tsx +++ b/packages/frontend/src/components/Election/Voting/GenericBallotView/CandidateLabel.tsx @@ -1,5 +1,6 @@ -import { Box, Typography } from '@mui/material'; +import { Box, Link, Typography } from '@mui/material'; import { Candidate } from '@equal-vote/star-vote-shared/domain_model/Candidate'; +import OpenInNewIcon from '@mui/icons-material/OpenInNew'; interface CandidateLabelProps { candidate: Candidate; gridArea: string; @@ -14,7 +15,8 @@ export default function CandidateLabel ({candidate, gridArea}: CandidateLabelPro wordwrap: "break-word", mx: '10px', }}> - {candidate.candidate_name} + {candidate.candidate_url && {candidate.candidate_name}} + {!candidate.candidate_url && candidate.candidate_name} );