Skip to content

Commit

Permalink
fix: hide retirement reason when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
r41ph committed Nov 6, 2024
1 parent 6811e48 commit 24d8f08
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions web-components/src/components/certificate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default function Certificate({
certificateNotFoundDescription,
}: CertificateProps): JSX.Element {
const { classes, cx } = useCertificateStyles({ background });

return (
<Box className={classes.root}>
<div className={classes.content}>
Expand Down Expand Up @@ -214,18 +213,20 @@ export default function Certificate({
</LinkComponent>
</CertificateItem>
))}
<CertificateItem
name={labels.RETIREMENT_REASON}
sx={{ mb: 2.5, '@media print': { mb: 0 } }}
>
<Body
sx={{
'@media print': { fontSize: 9, lineHeight: 0.8 },
}}
{certificateData.retirementReason && (
<CertificateItem
name={labels.RETIREMENT_REASON}
sx={{ mb: 2.5, '@media print': { mb: 0 } }}
>
{certificateData.retirementReason}
</Body>
</CertificateItem>
<Body
sx={{
'@media print': { fontSize: 9, lineHeight: 0.8 },
}}
>
{certificateData.retirementReason}
</Body>
</CertificateItem>
)}
<CertificateItem
name={labels.RETIREMENT_LOCATION}
sx={{ mb: 2.5, '@media print': { mb: 0 } }}
Expand Down

0 comments on commit 24d8f08

Please sign in to comment.