import { GearIcon, GlobeIcon, LockIcon, PeopleIcon, PersonIcon, ServerIcon, } from '@primer/octicons-react'; import { CircleUser, PlaneTakeoff } from 'lucide-react'; import { Form, NavLink } from 'react-router'; import type { ReactNode } from 'react'; import { cn } from '~/utils/cn'; import type { HeadplaneContext } from '~/utils/config/headplane'; import type { SessionData } from '~/utils/sessions.server'; import Menu from './Menu'; interface Props { config: HeadplaneContext['config']; user?: SessionData['user']; } interface LinkProps { href: string; text: string; } interface TabLinkProps { name: string; to: string; icon: ReactNode; } function TabLink({ name, to, icon }: TabLinkProps) { return (
cn( 'px-3 py-2 flex items-center rounded-md text-nowrap gap-x-2', 'after:absolute after:bottom-0 after:left-3 after:right-3', 'after:h-0.5 after:bg-headplane-900 dark:after:bg-headplane-200', 'hover:bg-headplane-200 dark:hover:bg-headplane-900', isActive ? 'after:visible' : 'after:invisible', ) } > {icon} {name}
); } function Link({ href, text }: LinkProps) { return ( {text} ); } export default function Header(data: Props) { return (

headplane

{data.user ? (

{data.user.name}

{data.user.email}

) : undefined}
); }