diff --git a/src/components/common/Comment.tsx b/src/components/common/Comment.tsx index d7eb4c03..cb223aad 100644 --- a/src/components/common/Comment.tsx +++ b/src/components/common/Comment.tsx @@ -81,8 +81,8 @@ export const Comment: React.FC<{
- {comments.data?.length || "0"} Comment - {comments.data?.length && comments.data.length > 1 ? "s" : ""} + {comments.data?.count || "0"} Comment + {comments.data?.count && comments.data.count > 1 ? "s" : ""}
@@ -145,7 +145,7 @@ export const Comment: React.FC<{
- {comments.data?.map((comment) => ( + {comments.data?.list?.map((comment) => (
= { + count: 0, + list: [], + cursor: "", + } + + let cursor = "" + do { + options.cursor = cursor + const res = (await indexer.getNotes(options)) || { + total: 0, + list: [], + } + pages.count = res.count + pages.list = pages.list.concat(res.list) + cursor = res.cursor || "" + } while (cursor) await Promise.all( - list.map(async (item) => { + pages.list.map(async (item) => { const characterId = item.characterId item.character = await indexer.getCharacter(characterId) }), ) - return list + return pages }