Skip to content

Commit

Permalink
feat: Hide phone number if not filled in in Contentful
Browse files Browse the repository at this point in the history
  • Loading branch information
leuke-naam committed Nov 14, 2023
1 parent 6b34978 commit 4bed5a9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/templates/JobTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ const JobView = ({ data }) => {
<Button primary href={'mailto:' + job.contactPerson.email} fluid>
{getTranslation(job.node_locale, 'vacancy.mail')}
</Button>
<Button
primary
href={'tel:' + job.contactPerson.phone}
fluid
className="call-button"
>
{getTranslation(job.node_locale, 'vacancy.call')}
</Button>
{job.contactPerson.phone && (
<Button
primary
href={'tel:' + job.contactPerson.phone}
fluid
className="call-button"
>
{getTranslation(job.node_locale, 'vacancy.call')}
</Button>
)}
</Card>
)}
</div>
Expand Down

0 comments on commit 4bed5a9

Please sign in to comment.