mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-18 23:39:10 +00:00
Don't show Tags on the sidebar if no tags exist. (#342)
This commit is contained in:
parent
cc3c63b996
commit
02644ecb73
|
@ -238,20 +238,24 @@ export const Sidebar: React.FC<SidebarProps> = (props) => {
|
|||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<Heading>Tags</Heading>
|
||||
<div className="mb-2">
|
||||
{tags?.slice(0, 6).map((tag, index) => (
|
||||
<SidebarLink key={index} to={`tag/${tag.id}`} className="">
|
||||
<div
|
||||
className="w-[12px] h-[12px] rounded-full"
|
||||
style={{ backgroundColor: tag.color || '#efefef' }}
|
||||
/>
|
||||
<span className="ml-2 text-sm">{tag.name}</span>
|
||||
</SidebarLink>
|
||||
))}
|
||||
{tags?.length ? (
|
||||
<div>
|
||||
<Heading>Tags</Heading>
|
||||
<div className="mb-2">
|
||||
{tags?.slice(0, 6).map((tag, index) => (
|
||||
<SidebarLink key={index} to={`tag/${tag.id}`} className="">
|
||||
<div
|
||||
className="w-[12px] h-[12px] rounded-full"
|
||||
style={{ backgroundColor: tag.color || '#efefef' }}
|
||||
/>
|
||||
<span className="ml-2 text-sm">{tag.name}</span>
|
||||
</SidebarLink>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
<div className="flex-grow" />
|
||||
<RunningJobsWidget />
|
||||
{/* <div className="flex w-full">
|
||||
|
|
Loading…
Reference in a new issue