Skip to content

Commit

Permalink
CMS-461: Hide the check advisory link if the park doesn't have an adv…
Browse files Browse the repository at this point in the history
…isory (#1540)
  • Loading branch information
ayumi-oxd authored Nov 29, 2024
1 parent 6d26c52 commit 900b279
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gatsby/src/components/park/parkAccessStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ export default function ParkAccessStatus({
src={accessStatus.parkStatusIcon}
alt={accessStatus.parkStatusText}
/>
{accessStatus.parkStatusText}{!hideComma && ", "}
<Link to={`/${slug}/#advisories`}>
{hideComma ? "C": "c"}heck advisories {`(${advisories.length})`}
</Link>
{accessStatus.parkStatusText}{(!hideComma && advisories.length > 0) && ", "}
{advisories.length > 0 &&
<Link to={`/${slug}/#advisories`}>
{hideComma ? "C": "c"}heck advisories {`(${advisories.length})`}
</Link>
}
{punctuation}
</>
}
Expand Down

0 comments on commit 900b279

Please sign in to comment.