Skip to content

Commit

Permalink
add timestamp to entry
Browse files Browse the repository at this point in the history
  • Loading branch information
dayhaysoos committed Jun 2, 2023
1 parent 275cb65 commit 2d5d703
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions use-shopping-cart/core/Entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function Entry({ id, product, quantity, price_metadata, product_metadata }) {
id,
quantity,
value: product.price * quantity,
timestamp: new Date().toISOString(), // add a timestamp in ISO 8601 format
price_data: {
...product.price_data,
...price_metadata
Expand Down

0 comments on commit 2d5d703

Please sign in to comment.