Skip to content

Commit

Permalink
Fixed an issue where alerts without a link still showed link
Browse files Browse the repository at this point in the history
  • Loading branch information
Gum-Joe committed Sep 23, 2021
1 parent 3096fde commit 1c8ce7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/AlterBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ const AlertBanner: React.FC<AlertBannerProps> = (props) => {
<h3 className="mobile">
<span>{showExpandButtonMobile ? "New Alert(s)" : props.alert.message}</span>&nbsp;
<br />
<a className="r-banner-link" href={expanded ? props.alert.linkTo : undefined} target="__blank" onClick={(event) => { !expanded && event.preventDefault(); reportAlertButtonClick(); }}>
{(!expanded || props.alert.linkTo) ? <a className="r-banner-link" href={expanded ? props.alert.linkTo : undefined} target="__blank" onClick={(event) => { !expanded && event.preventDefault(); reportAlertButtonClick(); }}>
<span>{expanded ? props.alert.linkText || "View" : "Expand"}</span>
</a>
</a> : null }
</h3>
<h3 className="desktop"><FontAwesomeIcon onClick={handleDismiss} className="r-banner-dismiss" icon={faTimes} /></h3>
<h3 className="mobile"><FontAwesomeIcon onClick={handleDismiss} className="r-banner-dismiss" icon={faTimes} /></h3>
Expand Down

0 comments on commit 1c8ce7b

Please sign in to comment.