| "use client"; | |
| import "./Header.css"; | |
| import Link from "next/link"; | |
| import Image from "next/image"; | |
| import { usePathname } from "next/navigation"; | |
| import Sidebar from "@/components/shared/Sidebar/Sidebar"; | |
| const Header = () => { | |
| const pathname = usePathname(); | |
| const isPlayerPage = | |
| pathname.startsWith("/player/movie") || | |
| pathname.startsWith("/player/tvshow"); | |
| return ( | |
| <> | |
| {!isPlayerPage && ( | |
| <div className="header-container"> | |
| <Sidebar /> | |
| <div className="header-right"> | |
| <Link href="/" className="header-logo-container"> | |
| <h1 className="header-title">Nexora</h1> | |
| <Image | |
| className="header-logo" | |
| src="/android-chrome-192x192.png" | |
| width={50} | |
| height={50} | |
| alt="Nexora Logo" | |
| /> | |
| </Link> | |
| </div> | |
| <Link href="/search" className="search-button"> | |
| <span className="material-symbols-outlined">search</span> | |
| </Link> | |
| </div> | |
| )} | |
| </> | |
| ); | |
| }; | |
| export default Header; | |