import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react' import { ArrowRightStartOnRectangleIcon, UserIcon, } from '@heroicons/react/24/outline' import { ChevronDownIcon } from '@heroicons/react/24/solid' import { Link, useFetcher, useRouteLoaderData } from 'react-router' import { ProfileIcon } from '~/components/icons/profile' import { Button } from '~/components/ui/button' import { APP } from '~/configs/meta' import { useAdminContext } from '~/contexts/admin' import type { loader } from '~/routes/_admin.lg-admin' export const Navbar = () => { const loaderData = useRouteLoaderData('routes/_admin.lg-admin') const { staffData } = loaderData || {} const fetcher = useFetcher() const { setEditProfile } = useAdminContext() return (
{APP.title}
{staffData?.profile_picture ? ( {staffData?.name} ) : ( )} {staffData?.name}
) }