import Avatar from "boring-avatars"; import Link from "next/link"; import { useRouter } from "next/navigation"; import React from "react"; const AppHeader = ({ title, sub, icon1, iconName1, iconHref1, iconEvent1, icon2, iconName2, iconHref2, iconEvent2, iconEvent3, userIcon, userIconData, userRole, }) => { const icons = [ { iconName: "ACOUNT", icon: ( ), }, { iconName: "NINJA", icon: ( ), }, { iconName: "ARROW", icon: ( ), }, { iconName: "PLUS", icon: ( ), }, ]; // console.log("title", title); // console.log("sub", sub); return (
{userIcon && (
)}

{title}

{sub}

{!userRole ? (
{icon1 ? (
{icons.find((e) => e.iconName == iconName1)?.icon}
) : ( "" )} {icon2 ? (
{icons.find((e) => e.iconName == iconName2)?.icon}
) : ( "" )}
) : (

{userRole && userRole[0]?.roleName}

)}
); }; export default AppHeader;