Skip to content

Commit

Permalink
Remove text decor from apply buttons, make them disappear when there'…
Browse files Browse the repository at this point in the history
…s no apply link
  • Loading branch information
Tyler Thompson committed Mar 5, 2024
1 parent ecd862f commit 536dea8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/app/roles/[slug]/page.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
border-radius: 0.25rem;
display: block;
align-self: center;
text-decoration: none;
}

h2 {
Expand Down
14 changes: 8 additions & 6 deletions src/app/roles/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ export default async function Role({ params }: IRolePageParams) {
const fields = flattenRichText(role.fields, ['description']);

function ApplyButton() {
return (
<a href={role.fields.applicationLink} className={cx('button')}>
Apply
</a>
);
} // TODO: usecallback
return role.fields.applicationLink
? (
<a href={role.fields.applicationLink} className={cx('button')} target="_blank">
Apply
</a>
)
: null;
}

return (
<div className={cx('base')}>
Expand Down

0 comments on commit 536dea8

Please sign in to comment.