diff --git a/src/pages/PassesPage.tsx b/src/pages/PassesPage.tsx
index 171ca2e..17a978c 100644
--- a/src/pages/PassesPage.tsx
+++ b/src/pages/PassesPage.tsx
@@ -227,10 +227,10 @@ export function PassesPage({
- {cards[0].title}
+ {cards[0]?.title}
- {cards[0].description}
+ {cards[0]?.description}
@@ -238,23 +238,23 @@ export function PassesPage({
- ${cards[0].adultPrice}
+ ${cards[0]?.adultPrice}
/ {passTypes[0].period}
- {cards[0].adultPrice && (
+ {cards[0]?.adultPrice && (
{/* Strikethrough price = originalPrice + $5 */}
- ${parseFloat(cards[0].adultPrice) + 5}
+ ${parseFloat(cards[0]?.adultPrice) + 5}
Save{" "}
{Math.round(
- ((5) / (parseFloat(cards[0].adultPrice) + 5)) * 100
+ ((5) / (parseFloat(cards[0]?.adultPrice) + 5)) * 100
)}
%
@@ -299,14 +299,14 @@ export function PassesPage({
{/* Unlimited Pass Card */}
setSelectedPass(passTypes[1].id)}
+ onClick={() => setSelectedPass(passTypes[1]?.id)}
>
- {passTypes[1].popular && (
+ {passTypes[1]?.popular && (
Most Popular
@@ -320,30 +320,30 @@ export function PassesPage({
- {cards[1].title}
+ {cards[1]?.title}
- {cards[1].description}
+ {cards[1]?.description}
{/* Pricing */}
- ${cards[1].adultPrice}
- / {passTypes[1].period}
+ ${cards[1]?.adultPrice}
+ / {passTypes[1]?.period}
- {cards[1].adultPrice && (
+ {cards[1]?.adultPrice && (
{/* Strikethrough price = originalPrice + $5 */}
- ${parseFloat(cards[1].adultPrice) + 5}
+ ${parseFloat(cards[1]?.adultPrice) + 5}
Save{" "}
{Math.round(
- ((5) / (parseFloat(cards[1].adultPrice) + 5)) * 100
+ ((5) / (parseFloat(cards[1]?.adultPrice) + 5)) * 100
)}
%
@@ -355,7 +355,7 @@ export function PassesPage({
- {passTypes[1].features.map((feature, index) => (
+ {passTypes[1]?.features.map((feature, index) => (
{feature}