From 1a0e99a75804bd9a74de1383b3a0fee6df6a09db Mon Sep 17 00:00:00 2001 From: Fascinated Date: Wed, 12 Jul 2023 09:41:04 +0100 Subject: [PATCH] add check if links exists --- src/app/page.tsx | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index af375ef..c58376d 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -91,23 +91,24 @@ export default function Home() { {/* Links (Buttons) */}
- {links.map((link, index) => { - const icons: any = link.icon?.split(" ") ?? []; + {links && + links.map((link, index) => { + const icons: any = link.icon?.split(" ") ?? []; - return ( - - {link.icon && } -

{link.title}

-
- ); - })} + > + {link.icon && } +

{link.title}

+ + ); + })}
{/* Social Links */}