fix element key bug

This commit is contained in:
plebbitor
2023-03-27 17:18:05 +02:00
parent a0c72dd99e
commit acb90e244e
7 changed files with 564 additions and 23 deletions
+2 -2
View File
@@ -338,11 +338,11 @@ const Catalog = () => {
loadMore={tryLoadMore}
hasMore={hasMore}
>
{feed.map(thread => {
{feed.map((thread, index) => {
const commentMediaInfo = getCommentMediaInfo(thread);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
return (
<Link style={{all: "unset", cursor: "pointer"}} key={`a-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)}>
<Link style={{all: "unset", cursor: "pointer"}} key={`${index}-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)}>
<div key={`thread-${thread.cid}`} className="thread">
{commentMediaInfo?.url ? (
<Fragment key="f-catalog">