fix: error when editing collection

This commit is contained in:
Sonny
2024-05-25 17:36:45 +02:00
committed by Sonny
parent 8b161dcf49
commit 9481b0ad7d
7 changed files with 20 additions and 6 deletions

View File

@@ -23,9 +23,11 @@ export default function LinkList({ links }: { links: Link[] }) {
return (
<LinkListStyle>
{links.map((link) => (
<LinkItem link={link} key={link.id} showUserControls />
))}
{links
.sort((a, b) => (a.created_at > b.created_at ? 1 : -1))
.map((link) => (
<LinkItem link={link} key={link.id} showUserControls />
))}
</LinkListStyle>
);
}