From 900b2799d44ff8bf027b3d525b144c56b2660216 Mon Sep 17 00:00:00 2001
From: Ayumi Tanaka <90415568+ayumi-oxd@users.noreply.github.com>
Date: Fri, 29 Nov 2024 13:40:16 -0800
Subject: [PATCH] CMS-461: Hide the check advisory link if the park doesn't
have an advisory (#1540)
---
src/gatsby/src/components/park/parkAccessStatus.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/gatsby/src/components/park/parkAccessStatus.js b/src/gatsby/src/components/park/parkAccessStatus.js
index b28d36c8c..96096be85 100644
--- a/src/gatsby/src/components/park/parkAccessStatus.js
+++ b/src/gatsby/src/components/park/parkAccessStatus.js
@@ -197,10 +197,12 @@ export default function ParkAccessStatus({
src={accessStatus.parkStatusIcon}
alt={accessStatus.parkStatusText}
/>
- {accessStatus.parkStatusText}{!hideComma && ", "}
-
- {hideComma ? "C": "c"}heck advisories {`(${advisories.length})`}
-
+ {accessStatus.parkStatusText}{(!hideComma && advisories.length > 0) && ", "}
+ {advisories.length > 0 &&
+
+ {hideComma ? "C": "c"}heck advisories {`(${advisories.length})`}
+
+ }
{punctuation}
>
}