Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
fix: use unique keys in maps
Browse files Browse the repository at this point in the history
  • Loading branch information
pfferrari committed Feb 29, 2024
1 parent 4e08529 commit fae10da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/components/SkuListForm/SkuListForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export function SkuListForm({
defaultTab={defaultTab}
>
<Tab name='Manual'>
{watchedFormItems?.map((item, idx) => (
<Spacer top='2' key={idx}>
{watchedFormItems?.map((item) => (
<Spacer top='2' key={item.sku_code}>
<ListItemCardSkuListItem
resource={item}
onQuantityChange={(resource, quantity) => {
Expand Down
7 changes: 5 additions & 2 deletions packages/app/src/pages/SkuListDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ export const SkuListDetails = (
{skuList.manual === true ? (
<>
{skuList.sku_list_items != null
? skuList.sku_list_items.map((item, idx) => (
<ListItemSkuListItem key={idx} resource={item} />
? skuList.sku_list_items.map((item) => (
<ListItemSkuListItem
key={item.sku_code}
resource={item}
/>
))
: null}
</>
Expand Down

0 comments on commit fae10da

Please sign in to comment.