dayhaysoos / use-shopping-cart

Shopping cart state and logic for Stripe
MIT License
907 stars 118 forks source link

Add example/nextjs-app-router #334

Closed bhattrajat closed 10 months ago

bhattrajat commented 10 months ago

Changes made

Issue faced

Hi @dayhaysoos I wasn't able to run any example using pnpm dev:* since It was giving me this error image and this warning as well image I think this is related to the last commit and maybe missing dependency of date-fns? So I have commented last committed code just to get pass the git commit. Can you please take a look into this and my PR as well?

netlify[bot] commented 10 months ago

Deploy request for useshoppingcart pending review.

Visit the deploys page to approve it

Name Link
Latest commit d4c6df48864244ee5e68126cbd5c066dd0014fa1
dayhaysoos commented 10 months ago

Whoa, thank you! I really appreciate you. I'm gonna take a look tomorrow morning if that's okay with you 🫡

dayhaysoos commented 10 months ago

Hey @bhattrajat, I sent a PR to your fork bc I did a whole bunch of messy stuff. Lemme know if it works though, maybe we can move forward from there. You should be able to run the project now and not see any dependency errors

bhattrajat commented 10 months ago

Hi, Now I am able to run the nextjs project without any error but if I try to revert back the commented code in use-shopping-cart\core\Entry.js It is not letting me due to an error. Can you please check?

dayhaysoos commented 10 months ago

@bhattrajat I just realized that date-fns isn't even in the package.json.

Does it work after you install it yourself with this command?

pnpm --filter use-shopping-cart add date-fns

bhattrajat commented 10 months ago

Yes, It works 🥳. Also, I have checked all the svgs are working fine in nextjs-app-router example. Let me know if you have any suggestions/improvements.

dayhaysoos commented 10 months ago

Thank you @bhattrajat, I'm going to go ahead and merge. Honestly I have to work on the new timestamp feature that I have in another branch so I have to play catch up before I give any feedback on improvements/suggestions for now. I really appreciate you!

@all-contributors please add @bhattrajat for examples

allcontributors[bot] commented 10 months ago

@dayhaysoos

I couldn't determine any contributions to add, did you specify any contributions? Please make sure to use valid contribution names.

I've put up a pull request to add @bhattrajat! :tada: