Skip to content

Commit

Permalink
Add quick candidate urls
Browse files Browse the repository at this point in the history
  • Loading branch information
ArendPeter committed Jan 5, 2025
1 parent b3273d4 commit d135a15
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -14,7 +15,8 @@ export default function CandidateLabel ({candidate, gridArea}: CandidateLabelPro
wordwrap: "break-word",
mx: '10px',
}}>
{candidate.candidate_name}
{candidate.candidate_url && <Link href={candidate.candidate_url} target='_blank'>{candidate.candidate_name}<OpenInNewIcon sx={{height: 15}}/></Link>}
{!candidate.candidate_url && candidate.candidate_name}
</Typography>
</Box>
);
Expand Down

0 comments on commit d135a15

Please sign in to comment.