"use client"; import { useState, useEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Menu, X, Mail } from 'lucide-react'; import { SiGithub, SiLinkedin } from 'react-icons/si'; import Link from 'next/link'; const Header = () => { const [isOpen, setIsOpen] = useState(false); const [scrolled, setScrolled] = useState(false); const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); useEffect(() => { const handleScroll = () => { setScrolled(window.scrollY > 50); }; window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); const navItems = [ { name: 'Home', href: '/' }, { name: 'Projects', href: '/projects' }, { name: 'About', href: '#about' }, { name: 'Contact', href: '#contact' }, ]; const socialLinks = [ { icon: SiGithub, href: 'https://github.com/Denshooter', label: 'GitHub' }, { icon: SiLinkedin, href: 'https://linkedin.com/in/dkonkol', label: 'LinkedIn' }, { icon: Mail, href: 'mailto:contact@dk0.dev', label: 'Email' }, ]; if (!mounted) { return null; } return ( <>
{[...Array(20)].map((_, i) => (
))}
dk0
{socialLinks.map((social) => ( ))}
setIsOpen(!isOpen)} className="md:hidden p-2 rounded-lg bg-gray-800/50 hover:bg-gray-700/50 transition-colors duration-200 text-gray-300 hover:text-white" > {isOpen ? : }
{isOpen && (
{navItems.map((item) => ( setIsOpen(false)} className="block text-gray-300 hover:text-white transition-colors duration-200 font-medium py-2" > {item.name} ))}
{socialLinks.map((social) => ( ))}
)}
); }; export default Header;