finished implementing readable mode api side

This commit is contained in:
daniel31x13
2023-10-30 00:30:45 -04:00
parent de20fb7bc1
commit c9c62b615b
10 changed files with 120 additions and 28 deletions
+5 -3
View File
@@ -229,9 +229,11 @@ export default function Index() {
</div>
{links.some((e) => e.collectionId === Number(router.query.id)) ? (
<div className="grid grid-cols-1 2xl:grid-cols-3 xl:grid-cols-2 gap-5">
{links.map((e, i) => {
return <LinkCard key={i} link={e} count={i} />;
})}
{links
.filter((e) => e.collection.id === activeCollection?.id)
.map((e, i) => {
return <LinkCard key={i} link={e} count={i} />;
})}
</div>
) : (
<NoLinksFound />
+5 -3
View File
@@ -191,9 +191,11 @@ export default function Index() {
</div>
</div>
<div className="grid grid-cols-1 2xl:grid-cols-3 xl:grid-cols-2 gap-5">
{links.map((e, i) => {
return <LinkCard key={i} link={e} count={i} />;
})}
{links
.filter((e) => e.tags.some((e) => e.id === Number(router.query.id)))
.map((e, i) => {
return <LinkCard key={i} link={e} count={i} />;
})}
</div>
</div>
</MainLayout>