44 lines
1.2 KiB
TypeScript

import Link from 'next/link';
import React from 'react';
interface NavItemsProps {
themeBtn?: string;
arrow?: boolean;
arrow2?: boolean;
btnSpace?: boolean;
}
const navItems = [
{ title: 'Home', link: '/' },
{ title: 'About', link: '/about-us' },
{ title: 'Services', link: '/services' },
{ title: 'Careers', link: '/careers' },
{ title: 'FAQ', link: '/faq' },
{ title: 'Blog', link: '/blog' },
{ title: 'Contact', link: '/contact' },
];
const NavItems: React.FC<NavItemsProps> = () => {
return (
<ul>
{navItems.map((item, index) => (
<li key={index}>
<Link
href={item.link}
onClick={(e) => {
if (item.link === '#contact-trigger') {
e.preventDefault();
window.dispatchEvent(new CustomEvent('openContactPopup'));
}
}}
>
{item.title}
</Link>
</li>
))}
</ul>
);
};
export default NavItems;