Skip to content

Commit

Permalink
UI: Show location button when link to code exist (#2392)
Browse files Browse the repository at this point in the history
* Show location button when link exist

Signed-off-by: tito12 <vladyslav.sedenko@gmail.com>

* Make button disable and not clickable if link not exist

Signed-off-by: tito12 <vladyslav.sedenko@gmail.com>

---------

Signed-off-by: tito12 <vladyslav.sedenko@gmail.com>
Co-authored-by: Willy Lulciuc <willy@datakin.com>
  • Loading branch information
tito12 and wslulciuc authored Feb 7, 2023
1 parent b5be887 commit 82c9307
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/src/components/jobs/JobDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ const JobDetailPage: FunctionComponent<IProps> = props => {
/>
</Box>
<Box mr={1}>
<Button variant='outlined' color='primary' target={'_blank'} href={job.location}>
<Button
variant='outlined'
color='primary'
target={'_blank'}
href={job.location}
disabled={!job.location}
>
{i18next.t('jobs.location')}
</Button>
</Box>
Expand Down

0 comments on commit 82c9307

Please sign in to comment.