chec / commercejs-nextjs-demo-store

Commerce demo store built for the Jamstack. Built with Commerce.js, Next.js, and can be one-click deployed to Netlify. Includes product catalog, customer login, categories, variants, cart, checkout, payments (Stripe) order confirmation, and printable receipts.
https://commercejs-demo-store.netlify.app/
BSD 3-Clause "New" or "Revised" License
1.07k stars 206 forks source link

Fix Loading Customer Data #202

Closed PaitoAnderson closed 3 years ago

PaitoAnderson commented 3 years ago

Test Procedure: 1) Login 2) Reload Page 3) Check if can still can load /account

PaitoAnderson commented 3 years ago

@jaepass Good point, I didn't notice that.

Let me know if you think this is a good approach, my thought process was these parts are far apart so I definitely need to use redux, but I didn't want to mix a isLoading prop that's only for UI in the customer data, so I created another loading object that can be potentially be used for keeping the loading state of other redux items too.

jaepass commented 3 years ago

Awesome, thank you @PaitoAnderson!! Let me test this out as soon as I can!

PaitoAnderson commented 3 years ago

Thanks for the quick review!