much improved collections listing page

This commit is contained in:
Daniel
2023-05-25 22:14:08 +03:30
parent 0f5f93eaff
commit 824f7c2789
6 changed files with 287 additions and 170 deletions
+13 -11
View File
@@ -112,17 +112,19 @@ export default function ({ className }: { className?: string }) {
<p className="text-sm p-2">Collections</p>
</div>
<div>
{collections.map((e, i) => {
return (
<SidebarItem
key={i}
text={e.name}
icon={<FontAwesomeIcon icon={faFolder} />}
path={`/collections/${e.id}`}
className="capitalize"
/>
);
})}
{collections
.sort((a, b) => a.name.localeCompare(b.name))
.map((e, i) => {
return (
<SidebarItem
key={i}
text={e.name}
icon={<FontAwesomeIcon icon={faFolder} />}
path={`/collections/${e.id}`}
className="capitalize"
/>
);
})}
</div>
<div className="text-gray-500 mt-5">
<p className="text-sm p-2">Tags</p>