From 543c5e6f08f515f2ee6ce859a4fd070d10ee3566 Mon Sep 17 00:00:00 2001 From: "Brady Stroud [SSW]" Date: Mon, 7 Oct 2024 10:29:01 +1030 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20=20Maps=20component=20-=20handle?= =?UTF-8?q?=20errors=20better?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/blocks/map.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/blocks/map.tsx b/components/blocks/map.tsx index ae29761..f58be03 100644 --- a/components/blocks/map.tsx +++ b/components/blocks/map.tsx @@ -7,6 +7,12 @@ interface MapEmbedProps { const MapEmbed: React.FC = ({ location }) => { const GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY; + if (!GOOGLE_MAPS_API_KEY) return

No maps today 😔

; + + if (!location) { + return

No location provided 😔

; + } + return (