mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(catalog): key warnings
This commit is contained in:
@@ -700,8 +700,9 @@ const CatalogPost = ({ post }) => {
|
||||
|
||||
const CatalogRow = ({ row }) => {
|
||||
const posts = [];
|
||||
for (const post of row) {
|
||||
posts.push(<CatalogPost key={post?.cid} post={post} />);
|
||||
for (const [index, post] of row.entries()) {
|
||||
const key = `${post?.cid}-${index}`;
|
||||
posts.push(<CatalogPost key={key} post={post} />);
|
||||
}
|
||||
return <div>{posts}</div>;
|
||||
};
|
||||
|
||||
@@ -1122,8 +1122,9 @@ const CatalogPost = ({ post }) => {
|
||||
|
||||
const CatalogRow = ({ row }) => {
|
||||
const posts = [];
|
||||
for (const post of row) {
|
||||
posts.push(<CatalogPost key={post?.cid} post={post} />);
|
||||
for (const [index, post] of row.entries()) {
|
||||
const key = `${post?.cid}-${index}`;
|
||||
posts.push(<CatalogPost key={key} post={post} />);
|
||||
}
|
||||
return <div>{posts}</div>;
|
||||
};
|
||||
|
||||
@@ -700,8 +700,9 @@ const CatalogPost = ({ post }) => {
|
||||
|
||||
const CatalogRow = ({ row }) => {
|
||||
const posts = [];
|
||||
for (const post of row) {
|
||||
posts.push(<CatalogPost key={post?.cid} post={post} />);
|
||||
for (const [index, post] of row.entries()) {
|
||||
const key = `${post?.cid}-${index}`;
|
||||
posts.push(<CatalogPost key={key} post={post} />);
|
||||
}
|
||||
return <div>{posts}</div>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user