souviknsl07 / e-commerce

This is a fully responsive Full-Stack E-commerce web app developed using Nextjs, NextAuth, Tailwind CSS, Firebase, Stripe, etc.
https://www.e-commercebysouvik.store
MIT License
13 stars 4 forks source link

When account is created, cart items added as a guest user are not associated to newly created user. #2

Open Skidragon opened 3 years ago

Skidragon commented 3 years ago

Pretty cool app, anyway, as a guest user of the app, when I add items to cart then create a new user via google auth. I want the items in the cart to be associated to the newly created user so I don't have to re-add them in.

souviknsl07 commented 3 years ago

The items are stored using redux store but the state doesn't persists, that's why when the app re-renders the items are gone. If anyone wants to work on this issue they can try connecting it to the database (recommended firebase firestore) or they can try using the local storage.

Skidragon commented 3 years ago

@souviknsl07 Cool just throwing out ideas for someone who wants to work on this project. I'm also making an e-commerce app with next.js, graphcms, stripe, and maybe firebase. Its one of those frontend mentor challenges called audiophile. Keep up the good work! :)

souviknsl07 commented 3 years ago

@souviknsl07 Cool just throwing out ideas for someone who wants to work on this project. I'm also making an e-commerce app with next.js, graphcms, stripe, and maybe firebase. Its one of those frontend mentor challenges called audiophile. Keep up the good work! :)

Thank you mate