diff --git a/src/components/layout/components/navbar/ItemsNavigation.tsx b/src/components/layout/components/navbar/ItemsNavigation.tsx index d659c55a1..4b97c7bd6 100644 --- a/src/components/layout/components/navbar/ItemsNavigation.tsx +++ b/src/components/layout/components/navbar/ItemsNavigation.tsx @@ -52,6 +52,8 @@ const NavigationLink = ({ href, text, isActive, isDarkMode, lang }: NavigationLi ); +const isExternalLink = (href: string) => /^https?:\/\//.test(href); + const DropdownMenu = ({ label, items, darkMode, lang }: DropdownMenuProps) => { const menuClasses = darkMode ? 'text-white hover:bg-white hover:bg-opacity-10 hover:text-cool-gray-20' @@ -71,16 +73,28 @@ const DropdownMenu = ({ label, items, darkMode, lang }: DropdownMenuProps) => {
- {items.map(({ href, text }) => ( - - {text} - - ))} + {items.map(({ href, text }) => + isExternalLink(href) ? ( + + {text} + + ) : ( + + {text} + + ), + )}