From 87a019ed4f17b85e4770e21249191eeb3d810ac3 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 21 Oct 2023 10:24:47 +0200 Subject: [PATCH] fix(catalog): key warnings --- src/components/views/AllCatalog.jsx | 5 +++-- src/components/views/Catalog.jsx | 5 +++-- src/components/views/SubscriptionsCatalog.jsx | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/views/AllCatalog.jsx b/src/components/views/AllCatalog.jsx index b9e072b4..6d6180c0 100755 --- a/src/components/views/AllCatalog.jsx +++ b/src/components/views/AllCatalog.jsx @@ -700,8 +700,9 @@ const CatalogPost = ({ post }) => { const CatalogRow = ({ row }) => { const posts = []; - for (const post of row) { - posts.push(); + for (const [index, post] of row.entries()) { + const key = `${post?.cid}-${index}`; + posts.push(); } return
{posts}
; }; diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index 6d3e24a9..13904c5d 100755 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -1122,8 +1122,9 @@ const CatalogPost = ({ post }) => { const CatalogRow = ({ row }) => { const posts = []; - for (const post of row) { - posts.push(); + for (const [index, post] of row.entries()) { + const key = `${post?.cid}-${index}`; + posts.push(); } return
{posts}
; }; diff --git a/src/components/views/SubscriptionsCatalog.jsx b/src/components/views/SubscriptionsCatalog.jsx index 71b29bad..53d531c1 100755 --- a/src/components/views/SubscriptionsCatalog.jsx +++ b/src/components/views/SubscriptionsCatalog.jsx @@ -700,8 +700,9 @@ const CatalogPost = ({ post }) => { const CatalogRow = ({ row }) => { const posts = []; - for (const post of row) { - posts.push(); + for (const [index, post] of row.entries()) { + const key = `${post?.cid}-${index}`; + posts.push(); } return
{posts}
; };