47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
"use client";
|
|
import Image from "next/image";
|
|
import header from "../app/styles/layout/header.module.scss";
|
|
import Link from "next/link";
|
|
import BarNavigation from "./BarNavigation";
|
|
import BarNavigationAdmin from "./BarNavigationAdmin";
|
|
import { usePathname } from "next/navigation";
|
|
|
|
function Header() {
|
|
const pathname = usePathname();
|
|
|
|
const publicNav = ["/escaner", "/agregarEquipo", "/editar", "/cambiarPass"];
|
|
const privateNav = ["/equipoComputo", "/crearCuenta", "/perifericos"];
|
|
|
|
return (
|
|
<header className={header.header}>
|
|
<Link
|
|
href="https://www.unam.mx/"
|
|
target="_blank"
|
|
className={header.center}
|
|
style={{
|
|
display: "flex",
|
|
alignItems: "center",
|
|
}}
|
|
>
|
|
<div className={header.logoContainer}>
|
|
<Image
|
|
className={header.logo}
|
|
src="/logo-blanco.png"
|
|
alt="Logo FES"
|
|
fill
|
|
style={{ objectFit: "contain" }}
|
|
/>
|
|
</div>
|
|
</Link>
|
|
<div className={header.yellowPart}></div>
|
|
<div className={header.containerBarNav}>
|
|
{publicNav.includes(pathname) && <BarNavigation />}
|
|
{privateNav.includes(pathname) && <BarNavigationAdmin />}
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|
|
|
|
export default Header;
|
|
//IO
|