From 351aa585d48f1e6c07817d6768ccf842c69b1b86 Mon Sep 17 00:00:00 2001 From: aasthag-14 <75171852+aasthag-14@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:57:52 +0530 Subject: [PATCH] add key to assets list Key is missing in the array map code which is causing repeated thumbnails when page is changed. Keys help React identify which items have changed, are added, or are removed. Keys should be given to the elements inside the array to give the elements a stable identity Reference https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key --- admin/src/components/asset-grid/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/src/components/asset-grid/index.tsx b/admin/src/components/asset-grid/index.tsx index 604a4ba..3821b28 100644 --- a/admin/src/components/asset-grid/index.tsx +++ b/admin/src/components/asset-grid/index.tsx @@ -19,7 +19,7 @@ const AssetGrid = (props: Props) => { if (muxAssets === undefined) return null; const assets = muxAssets.map((muxAsset) => ( - + ));