Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Dec 23, 2023
1 parent 67ed539 commit 8136419
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions apps/web/src/components/Bookcase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,34 @@
:id="`edge-${edgeIndex}`"
:key="`edge-${edgeIndex}`"
:invisible="
currentEdgeOpened === sortedBookcase[edgeIndex] ||
currentEdgeOpened === sortedBookcaseWithPopularity![edgeIndex] ||
edgeIndex > lastEdgeIndexContinuouslyLoaded
"
:highlighted="currentEdgeHighlighted === sortedBookcase[edgeIndex].id"
:publicationcode="sortedBookcase[edgeIndex].publicationcode"
:issuenumber="sortedBookcase[edgeIndex].issuenumber"
:issuenumber-reference="sortedBookcase[edgeIndex].issuenumberReference"
:creation-date="sortedBookcase[edgeIndex].creationDate?.toString()"
:popularity="sortedBookcase[edgeIndex].popularity || null"
:existing="!!sortedBookcase[edgeIndex].edgeId"
:highlighted="
currentEdgeHighlighted === sortedBookcaseWithPopularity![edgeIndex].id
"
:publicationcode="
sortedBookcaseWithPopularity![edgeIndex].publicationcode
"
:issuenumber="sortedBookcaseWithPopularity![edgeIndex].issuenumber"
:issuenumber-reference="
sortedBookcaseWithPopularity![edgeIndex].issuenumberReference
"
:creation-date="
sortedBookcaseWithPopularity![edgeIndex].creationDate?.toString()
"
:popularity="
sortedBookcaseWithPopularity![edgeIndex].popularity || null
"
:existing="!!sortedBookcaseWithPopularity![edgeIndex].edgeId"
:sprite-path="
edgesUsingSprites[sortedBookcase[edgeIndex].edgeId] || null
edgesUsingSprites[sortedBookcaseWithPopularity![edgeIndex].edgeId] ||
null
"
@loaded="onEdgeLoaded(edgeIndex)"
@open-book="$emit('open-book', sortedBookcase[edgeIndex])"
@open-book="
$emit('open-book', sortedBookcaseWithPopularity![edgeIndex])
"
/>
</template>
</div>
Expand Down Expand Up @@ -76,6 +89,10 @@ const {
)
>();
const sortedBookcaseWithPopularity = $computed(() =>
embedded ? undefined : (sortedBookcase as BookcaseEdgeWithPopularity[]),
);
const MAX_BATCH_SIZE = 50;
let loadedImages = $ref(new Set<number>() as Set<number>);
Expand Down

0 comments on commit 8136419

Please sign in to comment.