"use client" import Link from "next/link" import { usePathname } from "next/navigation" import { useState, useEffect } from "react" import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" const mainNavItems = [ { href: "/", label: "ALL SPORTS" }, { href: "/live", label: "LIVE" }, { href: "/virtual", label: "VIRTUAL" }, { href: "/special-games", label: "SPECIAL GAMES" }, { href: "/aviator", label: "AVIATOR" }, ] const extraNavItems = [ { href: "/multi-hot-5", label: "MULTI HOT 5" }, { href: "/poker", label: "POKER", isNew: true }, { href: "/race", label: "RACE", isNew: true }, { href: "/promo", label: "PROMO" }, ] export function SiteHeader() { const pathname = usePathname() const isLivePage = pathname === "/live" const [time, setTime] = useState("") useEffect(() => { const updateClock = () => { const now = new Date() setTime(now.toLocaleTimeString("en-GB", { hour12: false })) } updateClock() const interval = setInterval(updateClock, 1000) return () => clearInterval(interval) }, []) return (
{/* Top bar */}
🕒 {time || "00:00:00"}
+251 (0) Number
{/* Main header */}
{/* Logo Section */}
HARIF
SPORT
{/* Navigation Wrapper - Pushed to Right */}
{/* Home icon as button */} {/* Main Nav Group */} {/* Spacing Gap between groups if needed, but the user says "All in the right" */} {/* Extra Nav Group */}
{/* Secondary Sub Header */}
{[ { label: "Sport Home", href: "/" }, { label: "General View", href: "/live", forceActive: isLivePage }, { label: "Event View", href: "/live/event" }, ].map((tab) => { const isActive = tab.forceActive || pathname === tab.href return ( {tab.label} {isActive && tab.label !== "Sport Home" && (
)} ) })}
) }