|
|
|
@ -2,14 +2,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
import { useState } from 'react';
|
|
|
|
import { useState } from 'react';
|
|
|
|
import Link from 'next/link';
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
|
|
|
import { usePathname } from 'next/navigation';
|
|
|
|
|
|
|
|
|
|
|
|
export default function Navigation() {
|
|
|
|
export default function Navigation() {
|
|
|
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
|
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
|
|
|
|
|
|
const pathname = usePathname();
|
|
|
|
|
|
|
|
const isHomePage = pathname === '/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Adjust hrefs based on current page
|
|
|
|
|
|
|
|
const getHref = (hash: string) => {
|
|
|
|
|
|
|
|
return isHomePage ? hash : `/${hash}`;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const navItems = [
|
|
|
|
const navItems = [
|
|
|
|
{ name: 'Home', href: '#home' },
|
|
|
|
{ name: 'Home', href: getHref('#home') },
|
|
|
|
{ name: 'Services', href: '#services' },
|
|
|
|
{ name: 'Services', href: getHref('#services') },
|
|
|
|
{ name: 'About', href: '#about' },
|
|
|
|
{ name: 'About', href: getHref('#about') },
|
|
|
|
|
|
|
|
{ name: 'Feedback', href: '/feedback' },
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
@ -17,7 +26,7 @@ export default function Navigation() {
|
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
<div className="flex items-center justify-between h-16 md:h-20">
|
|
|
|
<div className="flex items-center justify-between h-16 md:h-20">
|
|
|
|
{/* Logo */}
|
|
|
|
{/* Logo */}
|
|
|
|
<Link href="#home" style={{ color: '#00171F' }} className="text-2xl md:text-3xl font-bold hover:opacity-80 transition-colors">
|
|
|
|
<Link href={isHomePage ? '#home' : '/'} style={{ color: '#00171F' }} className="text-2xl md:text-3xl font-bold hover:opacity-80 transition-colors">
|
|
|
|
Multilingual Family Space
|
|
|
|
Multilingual Family Space
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
|
|
@ -34,7 +43,7 @@ export default function Navigation() {
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<Link
|
|
|
|
<Link
|
|
|
|
href="#contact"
|
|
|
|
href={getHref('#contact')}
|
|
|
|
style={{ backgroundColor: '#00171F' }}
|
|
|
|
style={{ backgroundColor: '#00171F' }}
|
|
|
|
className="text-white px-6 py-2 rounded-full hover:opacity-90 transition-colors font-medium"
|
|
|
|
className="text-white px-6 py-2 rounded-full hover:opacity-90 transition-colors font-medium"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
@ -82,7 +91,7 @@ export default function Navigation() {
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<Link
|
|
|
|
<Link
|
|
|
|
href="#contact"
|
|
|
|
href={getHref('#contact')}
|
|
|
|
onClick={() => setIsMenuOpen(false)}
|
|
|
|
onClick={() => setIsMenuOpen(false)}
|
|
|
|
style={{ backgroundColor: '#00171F' }}
|
|
|
|
style={{ backgroundColor: '#00171F' }}
|
|
|
|
className="block text-white px-6 py-2 rounded-full hover:opacity-90 transition-colors font-medium text-center mt-4"
|
|
|
|
className="block text-white px-6 py-2 rounded-full hover:opacity-90 transition-colors font-medium text-center mt-4"
|
|
|
|
|