43 lines
1.1 KiB
TypeScript
43 lines
1.1 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: '#home' },
|
|
{ title: 'About', link: '#about' },
|
|
{ title: 'Services', link: '#services' },
|
|
{ title: 'Portfolio', link: '#portfolio' },
|
|
{ title: 'FAQ', link: '#faq' },
|
|
{ title: 'Contact', link: '#contact-trigger' },
|
|
];
|
|
|
|
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;
|