Skip to content

Commit

Permalink
refactor: key 값 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
chan9yu committed Oct 6, 2024
1 parent 4229ae2 commit 82da8b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default function App() {
<Header totalPrice={totalPrice} totalItems={products.length} />
<div className="w-full h-full overflow-y-scroll">
<ul className="w-11/12 mt-5 mx-auto px-6 bg-white shadow-xl divide-y divide-gray-200 border border-slate-200 rounded-lg">
{products.map(({ boughtDate, price, productName }, idx) => (
<Item key={idx} boughtDate={boughtDate} price={price} productName={productName} />
{products.map(({ boughtDate, price, productId, productName }) => (
<Item key={productId} boughtDate={boughtDate} price={price} productName={productName} />
))}
</ul>
<div ref={targetRef} className="p-4 flex justify-center">
Expand Down

0 comments on commit 82da8b4

Please sign in to comment.