fix sidebar spacing

This commit is contained in:
Nicolas Mowen 2024-03-05 14:50:37 -07:00
parent a1dac63e51
commit cdc700a457

View File

@ -13,20 +13,23 @@ function Sidebar() {
<span tabIndex={0} className="sr-only" />
<div className="w-full flex flex-col gap-0 items-center">
<Logo className="w-8 h-8 mb-6" />
{navbarLinks.map((item) => (
<div key={item.id}>
<NavItem
className={`mx-[10px] ${item.id == 1 ? "mb-2" : "mb-4"}`}
Icon={item.icon}
title={item.title}
url={item.url}
dev={item.dev}
/>
{item.id == 1 && item.url == location.pathname && (
<CameraGroupSelector className="mb-4" />
)}
</div>
))}
{navbarLinks.map((item) => {
const showCameraGroups =
item.id == 1 && item.url == location.pathname;
return (
<div key={item.id}>
<NavItem
className={`mx-[10px] ${showCameraGroups ? "mb-2" : "mb-4"}`}
Icon={item.icon}
title={item.title}
url={item.url}
dev={item.dev}
/>
{showCameraGroups && <CameraGroupSelector className="mb-4" />}
</div>
);
})}
</div>
<SettingsNavItems className="hidden md:flex flex-col items-center mb-8" />
</aside>