Skip to content

Commit

Permalink
adding timestamp to cart (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
samejima-san authored Sep 18, 2023
1 parent 0d0f36b commit 0df8624
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion use-shopping-cart/core/Entry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isClient } from '../utilities/SSR'
import { formatISO } from 'date-fns'

export const formatCurrencyString = ({
value,
Expand Down Expand Up @@ -78,7 +79,8 @@ export function createEntry({
product,
quantity: count,
price_metadata,
product_metadata
product_metadata,
timeStamp: formatISO(new Date())
})

state.cartDetails[id] = entry
Expand Down

0 comments on commit 0df8624

Please sign in to comment.