Spaces:
Build error
Build error
Download components/Header.js from ryeisi/anycoder-2d506362: direct link, hf CLI and curl.
- Browser
- Download file 3.81 kB
-
https://huggingface.co/spaces/ryeisi/anycoder-2d506362/resolve/main/components/Header.js
- Command line
-
hf download hf://spaces/ryeisi/anycoder-2d506362/components/Header.js
-
curl -L -o Header.js https://huggingface.co/spaces/ryeisi/anycoder-2d506362/resolve/main/components/Header.js
3.81 kB
| import { useState } from 'react' | |
| import { Menu, X, MessageCircle } from 'lucide-react' | |
| export default function Header() { | |
| const [isMenuOpen, setIsMenuOpen] = useState(false) | |
| const handleWhatsAppClick = () => { | |
| window.open('https://wa.me/919999999999', '_blank') | |
| } | |
| const navLinks = [ | |
| { name: 'Services', href: '#services' }, | |
| { name: 'How It Works', href: '#how-it-works' }, | |
| { name: 'Pricing', href: '#pricing' }, | |
| { name: 'Contact', href: '#contact' }, | |
| ] | |
| return ( | |
| <header className="sticky top-0 z-50 bg-white/95 backdrop-blur-sm border-b border-secondary-100"> | |
| <nav className="container-custom"> | |
| <div className="flex items-center justify-between h-16 md:h-20"> | |
| {/* Logo */} | |
| <a href="/" className="flex items-center space-x-2"> | |
| <div className="w-10 h-10 bg-primary-600 rounded-lg flex items-center justify-center"> | |
| <span className="text-white font-bold text-lg">GA</span> | |
| </div> | |
| <div className="hidden sm:block"> | |
| <span className="text-lg font-bold text-secondary-900">Ghaziabad</span> | |
| <span className="text-lg font-light text-secondary-600">Automation</span> | |
| </div> | |
| </a> | |
| {/* Desktop Navigation */} | |
| <div className="hidden md:flex items-center space-x-8"> | |
| {navLinks.map((link) => ( | |
| <a | |
| key={link.name} | |
| href={link.href} | |
| className="text-secondary-600 hover:text-primary-600 font-medium transition-colors duration-200" | |
| > | |
| {link.name} | |
| </a> | |
| ))} | |
| </div> | |
| {/* CTA Button */} | |
| <div className="hidden md:flex items-center space-x-4"> | |
| <button | |
| onClick={handleWhatsAppClick} | |
| className="inline-flex items-center space-x-2 px-4 py-2 text-primary-700 font-medium hover:bg-primary-50 rounded-lg transition-colors duration-200" | |
| > | |
| <MessageCircle className="w-5 h-5" /> | |
| <span>WhatsApp</span> | |
| </button> | |
| <a | |
| href="#contact" | |
| className="btn-primary text-sm" | |
| > | |
| Book Free Call | |
| </a> | |
| </div> | |
| {/* Mobile Menu Button */} | |
| <button | |
| onClick={() => setIsMenuOpen(!isMenuOpen)} | |
| className="md:hidden p-2 text-secondary-600 hover:text-secondary-900" | |
| > | |
| {isMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />} | |
| </button> | |
| </div> | |
| {/* Mobile Menu */} | |
| {isMenuOpen && ( | |
| <div className="md:hidden py-4 border-t border-secondary-100"> | |
| <div className="flex flex-col space-y-4"> | |
| {navLinks.map((link) => ( | |
| <a | |
| key={link.name} | |
| href={link.href} | |
| className="text-secondary-600 hover:text-primary-600 font-medium py-2" | |
| onClick={() => setIsMenuOpen(false)} | |
| > | |
| {link.name} | |
| </a> | |
| ))} | |
| <button | |
| onClick={handleWhatsAppClick} | |
| className="inline-flex items-center justify-center space-x-2 px-4 py-2 text-primary-700 font-medium bg-primary-50 rounded-lg w-full" | |
| > | |
| <MessageCircle className="w-5 h-5" /> | |
| <span>WhatsApp Us</span> | |
| </button> | |
| <a | |
| href="#contact" | |
| className="btn-primary text-center" | |
| onClick={() => setIsMenuOpen(false)} | |
| > | |
| Book Free Call | |
| </a> | |
| </div> | |
| </div> | |
| )} | |
| </nav> | |
| </header> | |
| ) | |
| } |