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 CatalogRow = ({ row }) => {
|
||||||
const posts = [];
|
const posts = [];
|
||||||
for (const post of row) {
|
for (const [index, post] of row.entries()) {
|
||||||
posts.push(<CatalogPost key={post?.cid} post={post} />);
|
const key = `${post?.cid}-${index}`;
|
||||||
|
posts.push(<CatalogPost key={key} post={post} />);
|
||||||
}
|
}
|
||||||
return <div>{posts}</div>;
|
return <div>{posts}</div>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1122,8 +1122,9 @@ const CatalogPost = ({ post }) => {
|
|||||||
|
|
||||||
const CatalogRow = ({ row }) => {
|
const CatalogRow = ({ row }) => {
|
||||||
const posts = [];
|
const posts = [];
|
||||||
for (const post of row) {
|
for (const [index, post] of row.entries()) {
|
||||||
posts.push(<CatalogPost key={post?.cid} post={post} />);
|
const key = `${post?.cid}-${index}`;
|
||||||
|
posts.push(<CatalogPost key={key} post={post} />);
|
||||||
}
|
}
|
||||||
return <div>{posts}</div>;
|
return <div>{posts}</div>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -700,8 +700,9 @@ const CatalogPost = ({ post }) => {
|
|||||||
|
|
||||||
const CatalogRow = ({ row }) => {
|
const CatalogRow = ({ row }) => {
|
||||||
const posts = [];
|
const posts = [];
|
||||||
for (const post of row) {
|
for (const [index, post] of row.entries()) {
|
||||||
posts.push(<CatalogPost key={post?.cid} post={post} />);
|
const key = `${post?.cid}-${index}`;
|
||||||
|
posts.push(<CatalogPost key={key} post={post} />);
|
||||||
}
|
}
|
||||||
return <div>{posts}</div>;
|
return <div>{posts}</div>;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user