use array ids

This commit is contained in:
Daniel Bulant 2022-12-10 19:11:28 +01:00
parent 39afafacab
commit 3b0b3cfbc2
3 changed files with 3 additions and 3 deletions

View file

@ -54,7 +54,7 @@
{/if} {/if}
<div class="items" class:list={$showType == "list"}> <div class="items" class:list={$showType == "list"}>
{#each entries.sort((a, b) => a.priority - b.priority) as entry} {#each entries.sort((a, b) => a.priority - b.priority) as entry (entry.media.id)}
<Item <Item
r18={entry.media.isAdult} r18={entry.media.isAdult}
cover={entry.media.coverImage.large} cover={entry.media.coverImage.large}

View file

@ -8,7 +8,7 @@
<div class="items" class:list={$showType == "list"}> <div class="items" class:list={$showType == "list"}>
{#each entries as entry} {#each entries as entry (entry.id)}
<a href="/{entry.id}"> <a href="/{entry.id}">
<Item <Item
r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)} r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)}

View file

@ -93,7 +93,7 @@
<ShowTypeChooser /> <ShowTypeChooser />
<div class="grid" class:list={$showType == "list"}> <div class="grid" class:list={$showType == "list"}>
{#each mangaRelations as manga} {#each mangaRelations.filter(t => $showNsfw !== "hide" || ["safe", "suggestive"].includes(t.attributes.contentRating)) as manga (manga.id)}
<a href="/{manga.id}" class="manga"> <a href="/{manga.id}" class="manga">
{#await relations then relations} {#await relations then relations}
<Item <Item