Next.js 13

  • Post author:
  • Post category:
  • Post comments:0 Comments

hello there, when you get this error: Error: Objects are not valid as a React child (found: [object Promise]) it means you missed await somewhere in your code, where you…

Continue ReadingNext.js 13

Change Product Price in Cookies

  • Post author:
  • Post category:
  • Post comments:0 Comments

hello there, you can have double check here: https://github.com/basir/mern-amazona/blob/8eca70eaf3d656ee654dac2e3b235e6debc07f90/backend/routes/orderRoutes.js#L34 for(const item in order.orderItems) { cont product = await Product.findById(item.product); item.price = product.price; } then calculate totalPrice based on the item.price

Continue ReadingChange Product Price in Cookies