diff --git a/components/header/Header.tsx b/components/header/Header.tsx index aa5918f..bccf5b3 100644 --- a/components/header/Header.tsx +++ b/components/header/Header.tsx @@ -78,6 +78,8 @@ function Header({ const platform = usePlatform(); const items = navItems ?? []; + // console.log('Header - items: ', items) + return ( <>
@@ -86,7 +88,7 @@ function Header({ searchbar={searchbar} platform={platform} > -
+
{alerts && alerts.length > 0 && } +
  • + +
  • + + ) +} + +export default ItemWhatsapp; \ No newline at end of file diff --git a/components/header/NavItem.tsx b/components/header/NavItem.tsx index 4d0460c..ed7286c 100644 --- a/components/header/NavItem.tsx +++ b/components/header/NavItem.tsx @@ -1,57 +1,133 @@ import type { SiteNavigationElement } from "apps/commerce/types.ts"; import Image from "apps/website/components/Image.tsx"; import { headerHeight } from "./constants.ts"; +import ItemWhatsapp from '$store/components/header/ItemWhatsapp.tsx'; function NavItem({ item }: { item: SiteNavigationElement }) { const { url, name, children } = item; const image = item?.image?.[0]; + const nameItemScape = item?.name?.replaceAll(/\s/g, '-').toLowerCase(); + const itemWhatsapp = nameItemScape === 'whatsapp' ? nameItemScape : null; + const itemLegend = nameItemScape === 'legenda' ? nameItemScape : null; + // console.log('Navitem - item: ', item?.name?.replaceAll(/\s/g, '-').toLowerCase()) + // console.log('----> ', itemWhatsapp) + return ( -
  • - - - {name} - - + <> + {itemWhatsapp ? + ( + + ) + : itemLegend ? + ( + // + <> +
  • + + + + {/* {name} */} + + + {/* {name} */} + + - {children && children.length > 0 && + {children && children.length > 0 && + ( + + ) + } +
  • + + ) + : ( - - )} - +
    + )} + + ) + } + ); } diff --git a/components/header/Navbar.tsx b/components/header/Navbar.tsx index 3017a19..3253847 100644 --- a/components/header/Navbar.tsx +++ b/components/header/Navbar.tsx @@ -24,6 +24,8 @@ function Navbar({ items, searchbar, logo, buttons, logoPosition = "left" }: { }) { const platform = usePlatform(); + // console.log('Navibar - items: ', items) + return ( <> {/* Mobile Version */} @@ -60,9 +62,9 @@ function Navbar({ items, searchbar, logo, buttons, logoPosition = "left" }: {
    {/* Desktop Version */} -