-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): Support SSG when the cart is non-empty #724
Conversation
🦋 Changeset detectedLatest commit: bc34a01 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
f481d9e
to
5e955cf
Compare
5e955cf
to
923334c
Compare
923334c
to
7b0f6e0
Compare
7b0f6e0
to
ff4458b
Compare
Thanks to @bobbyshaw for the feedback in #647 that led us down the path to improve this |
ff4458b
to
505ba19
Compare
505ba19
to
bc34a01
Compare
⚡️🏠 Lighthouse reportLighthouse ran against https://catalyst-latest-n9xl1u9c2-bigcommerce-platform.vercel.app 🖥️ DesktopWe ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:
📱 MobileWe ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:
|
What/Why?
Move the cart badge icon (indicating the number of items in the cart) to a client component, allowing us to drop the requirement that the user must not have a cart yet in order to support static routes. Now, the static pages are generated with empty carts, and when the client
CartBadge
component is initially rendered, it fetches the cart quantity from a new API endpoint. Revalidation of data still works as it did previously.Testing
Tested locally and in a vercel preview build, verifying that the transition from empty cart -> populated cart works correctly, as well as subsequent additions to the cart.