diff --git a/components/Contact.tsx b/components/Contact.tsx index 6af4e65..3bda747 100644 --- a/components/Contact.tsx +++ b/components/Contact.tsx @@ -1,20 +1,9 @@ 'use client'; -import { useState, useRef, useEffect } from 'react'; +import { useState } from 'react'; import { motion } from 'framer-motion'; -import { useInView } from 'framer-motion'; export default function Contact() { - const ref = useRef(null); - const isInView = useInView(ref, { once: true, margin: '-100px' }); - const [mounted, setMounted] = useState(false); - - useEffect(() => { - setMounted(true); - }, []); - - // Prevent hydration mismatch by using consistent initial state - const shouldAnimate = mounted && isInView; const [formData, setFormData] = useState({ firstName: '', @@ -46,11 +35,12 @@ export default function Contact() { }; return ( -
+
@@ -67,7 +57,8 @@ export default function Contact() {
{ + return isHomePage ? hash : `/${hash}`; + }; const navItems = [ - { name: 'Home', href: '#home' }, - { name: 'Services', href: '#services' }, - { name: 'About', href: '#about' }, + { name: 'Home', href: getHref('#home') }, + { name: 'Services', href: getHref('#services') }, + { name: 'About', href: getHref('#about') }, + { name: 'Feedback', href: '/feedback' }, ]; return ( @@ -17,7 +26,7 @@ export default function Navigation() {
{/* Logo */} - + Multilingual Family Space @@ -34,7 +43,7 @@ export default function Navigation() { ))} @@ -82,7 +91,7 @@ export default function Navigation() { ))} setIsMenuOpen(false)} style={{ backgroundColor: '#00171F' }} className="block text-white px-6 py-2 rounded-full hover:opacity-90 transition-colors font-medium text-center mt-4"