2025-02-23 17:00:17 +08:00
|
|
|
import { Link } from 'react-router'
|
|
|
|
|
|
2025-02-24 14:10:15 +07:00
|
|
|
import { ChevronIcon } from '~/components/icons/chevron'
|
2025-02-23 17:00:17 +08:00
|
|
|
import { NotificationIcon } from '~/components/icons/notification'
|
2025-02-25 06:07:45 +08:00
|
|
|
import { APP } from '~/configs/meta'
|
2025-02-23 17:41:54 +08:00
|
|
|
import { useAdminContext } from '~/contexts/admin'
|
2025-02-23 17:00:17 +08:00
|
|
|
|
2025-02-23 12:18:10 +08:00
|
|
|
export const Navbar = () => {
|
2025-02-23 17:41:54 +08:00
|
|
|
const { adminProfile } = useAdminContext()
|
|
|
|
|
|
2025-02-23 17:00:17 +08:00
|
|
|
return (
|
|
|
|
|
<div className="flex h-20 items-center justify-between border-b border-[#ECECEC] bg-white px-10 py-5">
|
|
|
|
|
<Link
|
2025-02-28 11:49:51 +08:00
|
|
|
to="/"
|
2025-02-23 17:00:17 +08:00
|
|
|
className="h-full"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
src={APP.logo}
|
|
|
|
|
alt={APP.title}
|
|
|
|
|
className="h-3/4 w-auto sm:h-full"
|
|
|
|
|
/>
|
|
|
|
|
</Link>
|
2025-02-23 17:41:54 +08:00
|
|
|
<div className="flex items-center gap-x-8">
|
|
|
|
|
<div className="flex w-3xs items-center justify-between">
|
|
|
|
|
<div className="flex items-center">
|
|
|
|
|
<div className="mr-3 h-8 w-8 rounded-full bg-[#C4C4C4]" />
|
|
|
|
|
<span className="text-xs">{adminProfile.name}</span>
|
|
|
|
|
</div>
|
2025-02-24 14:10:15 +07:00
|
|
|
<ChevronIcon className="opacity-50" />
|
2025-02-23 17:41:54 +08:00
|
|
|
</div>
|
2025-02-23 17:00:17 +08:00
|
|
|
<NotificationIcon
|
|
|
|
|
className="text-[#B0C3CC]"
|
|
|
|
|
showBadge={true}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2025-02-23 12:18:10 +08:00
|
|
|
}
|