From c01fc38363e9c89b557aecbbe23e2075cf1d397a Mon Sep 17 00:00:00 2001 From: Lilia Sviridova Date: Mon, 25 Nov 2024 13:25:49 +0200 Subject: [PATCH] Refactor --- components/common/SiteFooter.tsx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/components/common/SiteFooter.tsx b/components/common/SiteFooter.tsx index 291a52ec..5c1ff35a 100644 --- a/components/common/SiteFooter.tsx +++ b/components/common/SiteFooter.tsx @@ -521,7 +521,21 @@ function SiteFooter(props: SiteFooterProps) { {navItems && navItems.map((page) => ( - {page.children && page.children.length > 0 ? ( + {!page.children?.length && page.slug && ( + + <> + {theme?.navLinkIcons && ( + + )} + {page.children?.length > 0 && ( <> {page.name} @@ -543,10 +557,6 @@ function SiteFooter(props: SiteFooterProps) { ))} - ) : ( - - {page.name} - )} ))}