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.
On the account page, and the order view page, we have a verifyAuth method which runs when the component mounts. This checks that the user is logged in and redirects them away if not.
We can convert this into a HOC or something to centralise this logic.
On the account page, and the order view page, we have a
verifyAuth
method which runs when the component mounts. This checks that the user is logged in and redirects them away if not.We can convert this into a HOC or something to centralise this logic.