From 64464caeb7c1113eb79f3b3fc27712c602273f32 Mon Sep 17 00:00:00 2001 From: camilovegag Date: Mon, 5 Aug 2024 10:17:27 -0500 Subject: [PATCH] Add falback props instead of error, implement requested changes --- packages/berlin/src/components/cycles/Cycles.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/berlin/src/components/cycles/Cycles.tsx b/packages/berlin/src/components/cycles/Cycles.tsx index f1bff686..2da49123 100644 --- a/packages/berlin/src/components/cycles/Cycles.tsx +++ b/packages/berlin/src/components/cycles/Cycles.tsx @@ -6,13 +6,15 @@ import Button from '../button'; type CyclesProps = { cycles: GetCycleResponse[] | undefined; - errorMessage: string; eventId: string | undefined; - tab: string; - setActiveTab: (tab: string) => void; + fallback: { + message: string; + buttonMessage: string; + buttonOnClick: () => void; + }; }; -function Cycles({ cycles, errorMessage, eventId, tab, setActiveTab }: CyclesProps) { +function Cycles({ cycles, eventId, fallback }: CyclesProps) { const navigate = useNavigate(); const formatDate = (date: string) => { @@ -40,8 +42,8 @@ function Cycles({ cycles, errorMessage, eventId, tab, setActiveTab }: CyclesProp ) : (
- {errorMessage} - + {fallback.message} +
)}