Skip to content

Commit

Permalink
Avoid using index for key
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Oct 31, 2024
1 parent f220f5a commit 60d1f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pedido/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const PedidoComponent = () => {
<div>Domicilio de entrega</div>
<div>Gustos</div>
</div>
{pedidosPendientes.map((pedido: Pedido, i: number) => {
return <PedidoRow pedido={pedido} key={'pedido' + i}/>
{pedidosPendientes.map((pedido: Pedido) => {
return <PedidoRow pedido={pedido} key={pedido.id}/>
})}
{isEmpty(pedidosPendientes) &&
<>
Expand Down

0 comments on commit 60d1f44

Please sign in to comment.