From 824d60de20c37e48791648d4a8bb66abcdb2cc73 Mon Sep 17 00:00:00 2001 From: Jason Voccia Date: Sat, 12 Oct 2024 11:13:14 -0400 Subject: [PATCH] bug: skip date rendering if error in EventDetails.tsx --- app/components/EventDetails.tsx | 67 ++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/app/components/EventDetails.tsx b/app/components/EventDetails.tsx index 30907fb..d558bda 100644 --- a/app/components/EventDetails.tsx +++ b/app/components/EventDetails.tsx @@ -23,26 +23,49 @@ export function EventDetails({ day: "numeric", month: "long", }); - - return ( -
-

{formatter.format(date)}

-

{location}

- - - {linkText} - - -
- ); + try { + return ( +
+

{formatter.format(date)}

+

{location}

+ + + {linkText} + + +
+ ); + } catch (ex) { + return ( +
+

UNKNOWN

+

{location}

+ + + {linkText} + + +
+ ); + } }