diff --git a/.changeset/beige-feet-shake.md b/.changeset/beige-feet-shake.md
deleted file mode 100644
index 0b224c71f..000000000
--- a/.changeset/beige-feet-shake.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": minor
----
-
-Add dynamic robots.txt from control panel settings
diff --git a/.changeset/chilled-rocks-sneeze.md b/.changeset/chilled-rocks-sneeze.md
new file mode 100644
index 000000000..1319c8358
--- /dev/null
+++ b/.changeset/chilled-rocks-sneeze.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Change the rest of the auth pages to use toasts.
diff --git a/.changeset/fifty-queens-provide.md b/.changeset/fifty-queens-provide.md
deleted file mode 100644
index b6c5b2eeb..000000000
--- a/.changeset/fifty-queens-provide.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-Breadcrumbs for top level category pages are no longer rendered
diff --git a/.changeset/forty-points-cross.md b/.changeset/forty-points-cross.md
deleted file mode 100644
index 8b54268f3..000000000
--- a/.changeset/forty-points-cross.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-Fixes an issue when a numeric product option set to a minimum <= 0 breaks the counter component.
diff --git a/.changeset/gentle-experts-remember.md b/.changeset/gentle-experts-remember.md
new file mode 100644
index 000000000..792f87bca
--- /dev/null
+++ b/.changeset/gentle-experts-remember.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Converts the change password messages over to using a toast. This should provide a better DX and UX.
diff --git a/.changeset/great-turtles-breathe.md b/.changeset/great-turtles-breathe.md
deleted file mode 100644
index 198fa4f5f..000000000
--- a/.changeset/great-turtles-breathe.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-Updates the with-routes middleware to fallback on locale based rewrite logic if the redirect is a dynamic entity redirect.
diff --git a/.changeset/grumpy-roses-attack.md b/.changeset/grumpy-roses-attack.md
new file mode 100644
index 000000000..b52e1ff66
--- /dev/null
+++ b/.changeset/grumpy-roses-attack.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Update the register customer page to use toasts for messaging.
diff --git a/.changeset/late-boats-own.md b/.changeset/late-boats-own.md
new file mode 100644
index 000000000..4a52c68a6
--- /dev/null
+++ b/.changeset/late-boats-own.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Converts the reset password messages over to using a toast.
diff --git a/.changeset/little-plants-think.md b/.changeset/little-plants-think.md
deleted file mode 100644
index b96612c50..000000000
--- a/.changeset/little-plants-think.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-Fixes the product quantity reseting back to the previous value when adjusting the quantity fails.
diff --git a/.changeset/old-bananas-destroy.md b/.changeset/old-bananas-destroy.md
new file mode 100644
index 000000000..c5469d527
--- /dev/null
+++ b/.changeset/old-bananas-destroy.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Remove the account state provider components
diff --git a/.changeset/proud-queens-serve.md b/.changeset/proud-queens-serve.md
new file mode 100644
index 000000000..9dd2cb6d1
--- /dev/null
+++ b/.changeset/proud-queens-serve.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Converts the login messages over to using a toast.
diff --git a/.changeset/rich-flies-hang.md b/.changeset/rich-flies-hang.md
deleted file mode 100644
index 606392048..000000000
--- a/.changeset/rich-flies-hang.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-adds an empty state to category pages
diff --git a/.changeset/serious-rice-cough.md b/.changeset/serious-rice-cough.md
deleted file mode 100644
index 41e1ad327..000000000
--- a/.changeset/serious-rice-cough.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-Add no-store to mutations that are rate limited.
diff --git a/.changeset/silly-balloons-stare.md b/.changeset/silly-balloons-stare.md
new file mode 100644
index 000000000..7e5d325e6
--- /dev/null
+++ b/.changeset/silly-balloons-stare.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+After login, redirect to orders page instead of an account overview page. This also removes the account overview page.
diff --git a/.changeset/silly-queens-explode.md b/.changeset/silly-queens-explode.md
deleted file mode 100644
index 085a299b7..000000000
--- a/.changeset/silly-queens-explode.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-client": minor
----
-
-Support Trusted Proxy in client to support higher-traffic stores
diff --git a/.changeset/soft-years-guess.md b/.changeset/soft-years-guess.md
deleted file mode 100644
index 8f3ac4a87..000000000
--- a/.changeset/soft-years-guess.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/create-catalyst": minor
----
-
-Update OAuth scopes to future needs
diff --git a/.changeset/translations-patch-276d7650.md b/.changeset/translations-patch-276d7650.md
deleted file mode 100644
index ad17b2636..000000000
--- a/.changeset/translations-patch-276d7650.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@bigcommerce/catalyst-core": patch
----
-
-Update translations.
diff --git a/.changeset/yellow-cougars-allow.md b/.changeset/yellow-cougars-allow.md
new file mode 100644
index 000000000..b7e09178a
--- /dev/null
+++ b/.changeset/yellow-cougars-allow.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+If a customer is already logged in, we want to redirect them back to their account pages if they are trying to hit one of the non-logged-in customer auth routes. The prevents any side effects that may occur trying to re-auth the client. This is done by providing a root layout.tsx page under the (auth) route group.
diff --git a/.changeset/young-pugs-dream.md b/.changeset/young-pugs-dream.md
new file mode 100644
index 000000000..f38398b1a
--- /dev/null
+++ b/.changeset/young-pugs-dream.md
@@ -0,0 +1,5 @@
+---
+"@bigcommerce/catalyst-core": minor
+---
+
+Converts the change/forgot password messages over to using a toast.
diff --git a/.env.example b/.env.example
index 25a154837..bacc5581f 100644
--- a/.env.example
+++ b/.env.example
@@ -2,9 +2,9 @@
# The control panel URL is of the form `https://store-{hash}.mybigcommerce.com`.
BIGCOMMERCE_STORE_HASH=
-# A bearer token that authorizes server-to-server requests to the GraphQL Storefront API
-# See https://developer.bigcommerce.com/docs/rest-authentication/tokens/customer-impersonation-token
-BIGCOMMERCE_CUSTOMER_IMPERSONATION_TOKEN=
+# A JWT Token for accessing the Storefront API. Enables server-to-server requests if allowed_cors_origins is omitted.
+# See https://developer.bigcommerce.com/docs/rest-authentication/tokens#storefront-tokens
+BIGCOMMERCE_STOREFRONT_TOKEN=
# The Channel ID for the selling channel being serviced by this Catalyst storefront.
# Channel ID 1 will allow you to load the same data being used on the default Stencil storefront on your store,
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index ea1a103dc..870d5ddca 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -17,3 +17,6 @@ updates:
update-types: ['version-update:semver-major']
- dependency-name: 'react-day-picker'
update-types: ['version-update:semver-major']
+ # We are using the latest pre-releases for react and react-dom.
+ - dependency-name: 'react'
+ - dependency-name: 'react-dom'
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index 53b973964..965c030e6 100644
--- a/.github/workflows/basic.yml
+++ b/.github/workflows/basic.yml
@@ -13,7 +13,7 @@ env:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
BIGCOMMERCE_STORE_HASH: ${{ secrets.BIGCOMMERCE_STORE_HASH }}
- BIGCOMMERCE_CUSTOMER_IMPERSONATION_TOKEN: ${{ secrets.BIGCOMMERCE_CUSTOMER_IMPERSONATION_TOKEN }}
+ BIGCOMMERCE_STOREFRONT_TOKEN: ${{ secrets.BIGCOMMERCE_STOREFRONT_TOKEN }}
BIGCOMMERCE_CHANNEL_ID: ${{ secrets.BIGCOMMERCE_CHANNEL_ID }}
jobs:
diff --git a/.github/workflows/changesets-release.yml b/.github/workflows/changesets-release.yml
index 1de90fcd9..2f6f7f693 100644
--- a/.github/workflows/changesets-release.yml
+++ b/.github/workflows/changesets-release.yml
@@ -29,6 +29,8 @@ jobs:
- name: Build Packages
run: pnpm --filter "./packages/**" build
+ env:
+ CLI_SEGMENT_WRITE_KEY: ${{ secrets.CLI_SEGMENT_WRITE_KEY }}
- name: Create Release Pull Request or Publish to npm
id: changesets
diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml
index b54553523..56aaa8253 100644
--- a/.github/workflows/regression-tests.yml
+++ b/.github/workflows/regression-tests.yml
@@ -140,7 +140,7 @@ jobs:
- name: Run Playwright tests
run: |
cd core
- npx playwright test tests/ui/ --project=tests-chromium
+ npx playwright test tests/ui/ --project=tests-chromium
- uses: actions/upload-artifact@v4
if: failure()
@@ -151,7 +151,7 @@ jobs:
- name: Send slack notification
uses: slackapi/slack-github-action@v1.26.0
- if: ${{ steps.pr_details.outputs.draft != 'true' && failure() }}
+ if: ${{ steps.pr_details.outputs.draft != 'true' && steps.pr_details.outputs.pr && failure() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
@@ -213,7 +213,7 @@ jobs:
- name: Send slack notification
uses: slackapi/slack-github-action@v1.26.0
- if: ${{ steps.pr_details.outputs.draft != 'true' && failure() }}
+ if: ${{ steps.pr_details.outputs.draft != 'true' && steps.pr_details.outputs.pr && failure() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
diff --git a/SECURITY.md b/SECURITY.md
index bc6e641af..0095d631d 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,8 +1,11 @@
# Reporting security issues
-If you have found a security vulnerability in an active open-source repository created and owned by BigCommerce, please report it to our [public bug bounty program](https://bugcrowd.com/bigcommerce). If you would prefer to submit via email, please send your report to [security@bigcommerce.com](mailto:security@bigcommerce.com)
+BigCommerce is dedicated to the responsible disclosure of security vulnerabilities.
+If you have found a security vulnerability in an active open-source repository created and owned by BigCommerce, please report it to our [public bug bounty program](https://bugcrowd.com/bigcommerce). If you would prefer to submit via email, please send your report to [security@bigcommerce.com](mailto:security@bigcommerce.com).
-*Note: Only submissions to our bounty program on BugCrowd will be eligible for bounties. Bounty eligibility and amounts are determined according to the program guidelines.*
+We ask that you **do not** open a public GitHub issue to report security concerns.
-Please ***do not*** use public issues to report security vulnerabilities.
+_Note: Only submissions to our bounty program on BugCrowd will be eligible for bounties. Bounty eligibility and amounts are determined according to the program guidelines._
-Bugs in 3rd-party modules should be reported to those modules’ maintainers.
+_Note: Bugs in 3rd-party modules and/or dependencies should be reported to the owners/maintainers or those modules and/or dependencies, BigCommerce has no control or authority over third party content._
+
+Thank you in advance for collaborating with us to help protect us and our customers.
diff --git a/core/.env.example b/core/.env.example
index 25a154837..bacc5581f 100644
--- a/core/.env.example
+++ b/core/.env.example
@@ -2,9 +2,9 @@
# The control panel URL is of the form `https://store-{hash}.mybigcommerce.com`.
BIGCOMMERCE_STORE_HASH=
-# A bearer token that authorizes server-to-server requests to the GraphQL Storefront API
-# See https://developer.bigcommerce.com/docs/rest-authentication/tokens/customer-impersonation-token
-BIGCOMMERCE_CUSTOMER_IMPERSONATION_TOKEN=
+# A JWT Token for accessing the Storefront API. Enables server-to-server requests if allowed_cors_origins is omitted.
+# See https://developer.bigcommerce.com/docs/rest-authentication/tokens#storefront-tokens
+BIGCOMMERCE_STOREFRONT_TOKEN=
# The Channel ID for the selling channel being serviced by this Catalyst storefront.
# Channel ID 1 will allow you to load the same data being used on the default Stencil storefront on your store,
diff --git a/core/.eslintrc.cjs b/core/.eslintrc.cjs
index 6bc34066c..ce4806257 100644
--- a/core/.eslintrc.cjs
+++ b/core/.eslintrc.cjs
@@ -27,6 +27,12 @@ const config = {
name: 'next/link',
message: "Please import 'Link' from '~/components/Link' instead.",
},
+ {
+ name: 'next/image',
+ importNames: ['default'],
+ message:
+ "Please import 'Image' from '~/components/image' instead. This component handles CDN and static image optimization.",
+ },
{
name: '~/i18n/routing',
importNames: ['Link'],
diff --git a/core/.gitignore b/core/.gitignore
index d96c1399f..26db3633a 100644
--- a/core/.gitignore
+++ b/core/.gitignore
@@ -43,3 +43,6 @@ client/generated
# secrets
.catalyst
+
+# Build config
+build-config.json
diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md
index 62a0a6a3b..9b80a6272 100644
--- a/core/CHANGELOG.md
+++ b/core/CHANGELOG.md
@@ -1,5 +1,180 @@
# Changelog
+## 0.23.0
+
+### Minor Changes
+
+- [#1639](https://github.com/bigcommerce/catalyst/pull/1639) [`ae2c6cd`](https://github.com/bigcommerce/catalyst/commit/ae2c6cd76b2ccc5c994bd298983cb1665c571d02) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - Add orders for customer account. Now customer can open orders history or move to specific order details.
+
+- [#1729](https://github.com/bigcommerce/catalyst/pull/1729) [`d52affe`](https://github.com/bigcommerce/catalyst/commit/d52affe56dee23a81263392030fe635c824fb182) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Removed ReCaptcha validation when you are logged in and making account changes. We have already validated a customer is human at the loggin screen.
+
+- [#1728](https://github.com/bigcommerce/catalyst/pull/1728) [`d7dbd7a`](https://github.com/bigcommerce/catalyst/commit/d7dbd7a04fc8cb87cf223fb5a17af8d59c6431ea) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Convert the messages that were displayed when deleting an address over to using the toast functionality.
+
+### Patch Changes
+
+- [#1727](https://github.com/bigcommerce/catalyst/pull/1727) [`d3c6dbc`](https://github.com/bigcommerce/catalyst/commit/d3c6dbc25c16901f694e053ccdee8193647f5760) Thanks [@migueloller](https://github.com/migueloller)! - Ignore empty strings when parsing array URL search parameters in faceted search.
+
+- [#1730](https://github.com/bigcommerce/catalyst/pull/1730) [`ad8c86d`](https://github.com/bigcommerce/catalyst/commit/ad8c86d574474eb5ed18d99265fe4001d267fb5f) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Fixes the inventory handling to handle some options being out of stock.
+
+## 0.22.1
+
+### Patch Changes
+
+- [#1649](https://github.com/bigcommerce/catalyst/pull/1649) [`d38f164`](https://github.com/bigcommerce/catalyst/commit/d38f164d3e87ca87d3e792f8058a74c1f13e4220) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - improve account forms submit errors message
+
+- [#1651](https://github.com/bigcommerce/catalyst/pull/1651) [`1a222cb`](https://github.com/bigcommerce/catalyst/commit/1a222cb09dfc65b440090f868b01291e644bec4a) Thanks [@bc-yevhenii-buliuk](https://github.com/bc-yevhenii-buliuk)! - refresh the entire list of addresses after deleting an address
+
+- [#1722](https://github.com/bigcommerce/catalyst/pull/1722) [`1f0c2ef`](https://github.com/bigcommerce/catalyst/commit/1f0c2ef9212be079630f64a15a2f121ed7a358f9) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Remove `--turbo` from `pnpm dev` as it has some issues with the latest dependency bump, along with others.
+
+## 0.22.0
+
+### Minor Changes
+
+- [#1717](https://github.com/bigcommerce/catalyst/pull/1717) [`12fea79`](https://github.com/bigcommerce/catalyst/commit/12fea7962c25c395b550717343300561fb8d6a4c) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Add a check for variant stock levels on add to cart button
+
+- [#1674](https://github.com/bigcommerce/catalyst/pull/1674) [`512c338`](https://github.com/bigcommerce/catalyst/commit/512c338e4abcb3cdb7f457e4012e0c90c6a8391a) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Uses the API responses to show better errors when adding a product to the cart.
+
+- [#1710](https://github.com/bigcommerce/catalyst/pull/1710) [`15edf31`](https://github.com/bigcommerce/catalyst/commit/15edf311f5508a85f09acd8135fbf2b4aae09ff0) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Rename `BcImage` to `Image`
+
+- [#1703](https://github.com/bigcommerce/catalyst/pull/1703) [`7b598ff`](https://github.com/bigcommerce/catalyst/commit/7b598ff012ce40fe4b34be780c01cdbbe61e9b7e) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Adds localized data fetching withing the beforeRequest client helper. If information is translated (currently possible to update via the Admin GraphQL API) then we will return the translated product data. See https://developer.bigcommerce.com/docs/store-operations/catalog/graphql-admin/product-basic-info for more information on how to use overrides.
+
+- [#1710](https://github.com/bigcommerce/catalyst/pull/1710) [`15edf31`](https://github.com/bigcommerce/catalyst/commit/15edf311f5508a85f09acd8135fbf2b4aae09ff0) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Force usage of the `` component. This component should fallback to using the default image loader if the url doesn't come from the BigCommerce CDN.
+
+- [#1672](https://github.com/bigcommerce/catalyst/pull/1672) [`ffefc61`](https://github.com/bigcommerce/catalyst/commit/ffefc6151b0fb09bf83e7556736452a3138ef9c4) Thanks [@chanceaclark](https://github.com/chanceaclark)! - If a string is not provided in the selected locale, the translation system will fallback to "en" for that specific entry.
+
+### Patch Changes
+
+- [#1661](https://github.com/bigcommerce/catalyst/pull/1661) [`93d9984`](https://github.com/bigcommerce/catalyst/commit/93d99844ed4957a5a4611970589a2246b1dffb16) Thanks [@bookernath](https://github.com/bookernath)! - Remove webpack chunk plugin
+
+- [#1688](https://github.com/bigcommerce/catalyst/pull/1688) [`3267840`](https://github.com/bigcommerce/catalyst/commit/3267840981ebb6ed62e0b87f60623d0c4352309d) Thanks [@thebigrick](https://github.com/thebigrick)! - Added aria label for compare button
+
+- [#1617](https://github.com/bigcommerce/catalyst/pull/1617) [`c852961`](https://github.com/bigcommerce/catalyst/commit/c852961063fb090907b23074301fcbc41e75b8ec) Thanks [@bc-yevhenii-buliuk](https://github.com/bc-yevhenii-buliuk)! - UX improvements for account pages
+
+- [#1690](https://github.com/bigcommerce/catalyst/pull/1690) [`ee6bbb9`](https://github.com/bigcommerce/catalyst/commit/ee6bbb96e9c357af249fb881f5de503f9e164fb1) Thanks [@thebigrick](https://github.com/thebigrick)! - Added localization to hardcoded strings
+
+- [#1647](https://github.com/bigcommerce/catalyst/pull/1647) [`ad5ed3f`](https://github.com/bigcommerce/catalyst/commit/ad5ed3f50f6d3025bf299cc04f51bf0864afd3a2) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - update submit create account errors message
+
+- [#1715](https://github.com/bigcommerce/catalyst/pull/1715) [`2960a70`](https://github.com/bigcommerce/catalyst/commit/2960a708084030b484de945e725b5bd0c32462ee) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+- [#1694](https://github.com/bigcommerce/catalyst/pull/1694) [`07f8463`](https://github.com/bigcommerce/catalyst/commit/07f84634000c4d1dac6f89037d9501bc056537c9) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+## 0.21.0
+
+### Minor Changes
+
+- [#1631](https://github.com/bigcommerce/catalyst/pull/1631) [`58d9e7c`](https://github.com/bigcommerce/catalyst/commit/58d9e7ccb7915593cd012cce6d9f4bdf66cb381f) Thanks [@deini](https://github.com/deini)! - fetch available locales at build time
+
+### Patch Changes
+
+- [#1636](https://github.com/bigcommerce/catalyst/pull/1636) [`23abacf`](https://github.com/bigcommerce/catalyst/commit/23abacfb8ff4ff9d269e51821a6a992a9cb2d4f5) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Remove console.error when falling back to defaultChannelId
+
+- [#1636](https://github.com/bigcommerce/catalyst/pull/1636) [`23abacf`](https://github.com/bigcommerce/catalyst/commit/23abacfb8ff4ff9d269e51821a6a992a9cb2d4f5) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Clean up login error handling.
+
+- Updated dependencies [[`23abacf`](https://github.com/bigcommerce/catalyst/commit/23abacfb8ff4ff9d269e51821a6a992a9cb2d4f5)]:
+ - @bigcommerce/catalyst-client@0.14.0
+
+## 0.20.0
+
+### Minor Changes
+
+- [#1623](https://github.com/bigcommerce/catalyst/pull/1623) [`16e3a76`](https://github.com/bigcommerce/catalyst/commit/16e3a763571324dccd9031a79e400409eff9ee0c) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Next 15 upgrade
+
+### Patch Changes
+
+- [#1629](https://github.com/bigcommerce/catalyst/pull/1629) [`72a30a8`](https://github.com/bigcommerce/catalyst/commit/72a30a84193f7ed8a09b770d16dd2c9a8a7d1347) Thanks [@deini](https://github.com/deini)! - Use Typescript on Next Config
+
+- [#1618](https://github.com/bigcommerce/catalyst/pull/1618) [`d60e916`](https://github.com/bigcommerce/catalyst/commit/d60e916661385fab211f7e8b1342dbda2fd504b9) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+- Updated dependencies [[`16e3a76`](https://github.com/bigcommerce/catalyst/commit/16e3a763571324dccd9031a79e400409eff9ee0c)]:
+ - @bigcommerce/catalyst-client@0.13.0
+
+## 0.19.0
+
+### Minor Changes
+
+- [#1262](https://github.com/bigcommerce/catalyst/pull/1262) [`0c2023b`](https://github.com/bigcommerce/catalyst/commit/0c2023bae650039cd79ba51b1161b5c8c16f0b8d) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Removes all usages of the customer impersonation token. Also updates the docs to correspond with the Storefront API Token.
+
+- [#1262](https://github.com/bigcommerce/catalyst/pull/1262) [`0c2023b`](https://github.com/bigcommerce/catalyst/commit/0c2023bae650039cd79ba51b1161b5c8c16f0b8d) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Allows the ability to consume a [storefront token](https://developer.bigcommerce.com/docs/rest-authentication/tokens#storefront-tokens). This new token will allow Catalyst to create `customerAccessToken`'s whenever a user logs into their account. This change doesn't include consuming the either token, only adding the ability to pass it in.
+
+### Patch Changes
+
+- Updated dependencies [[`0c2023b`](https://github.com/bigcommerce/catalyst/commit/0c2023bae650039cd79ba51b1161b5c8c16f0b8d), [`0c2023b`](https://github.com/bigcommerce/catalyst/commit/0c2023bae650039cd79ba51b1161b5c8c16f0b8d)]:
+ - @bigcommerce/catalyst-client@0.12.0
+
+## 0.18.1
+
+### Patch Changes
+
+- [#1525](https://github.com/bigcommerce/catalyst/pull/1525) [`e751319`](https://github.com/bigcommerce/catalyst/commit/e751319728359a2e72d48072a4b68055ed4dbb1e) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - fix warning for using the same keys on items
+
+- [#1521](https://github.com/bigcommerce/catalyst/pull/1521) [`fd83a78`](https://github.com/bigcommerce/catalyst/commit/fd83a78f94b170dcf6e8aed14c61e3791b64c5de) Thanks [@bc-yevhenii-buliuk](https://github.com/bc-yevhenii-buliuk)! - fix styles for active account tab
+
+- [#1520](https://github.com/bigcommerce/catalyst/pull/1520) [`c898792`](https://github.com/bigcommerce/catalyst/commit/c898792a0ed3ee9849cdfeda7018245e491e8016) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - improve error message on reset password page
+
+- [#1524](https://github.com/bigcommerce/catalyst/pull/1524) [`f08883c`](https://github.com/bigcommerce/catalyst/commit/f08883c8fa559f0b6015321e2396606d77fa0ad6) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - improve behaviour for change password page for logged in user
+
+- [#1529](https://github.com/bigcommerce/catalyst/pull/1529) [`22426b2`](https://github.com/bigcommerce/catalyst/commit/22426b256e29b6c3dd145fd6df9ed57c5a99bd75) Thanks [@bc-yevhenii-buliuk](https://github.com/bc-yevhenii-buliuk)! - fix validation message for email on account settings page
+
+- [#1516](https://github.com/bigcommerce/catalyst/pull/1516) [`41270c2`](https://github.com/bigcommerce/catalyst/commit/41270c29a6e21217622c29b18e91f9a24d58ea8b) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+- [#1534](https://github.com/bigcommerce/catalyst/pull/1534) [`de48618`](https://github.com/bigcommerce/catalyst/commit/de486186acfec2604d749b9f6d2b4656a9e9280a) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+## 0.18.0
+
+### Minor Changes
+
+- [#1491](https://github.com/bigcommerce/catalyst/pull/1491) [`313a591`](https://github.com/bigcommerce/catalyst/commit/313a5913181a144b53cb12208132f4a9924e2256) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Bump `next-intl` which includes [some minor changes and updated APIs](<(https://next-intl-docs.vercel.app/blog/next-intl-3-22)>):
+
+ - Use new `createNavigation` api.
+ - Pass `locale` to redirects.
+ - `setRequestLocale` is no longer unstable.
+
+### Patch Changes
+
+- [#1505](https://github.com/bigcommerce/catalyst/pull/1505) [`691ec2b`](https://github.com/bigcommerce/catalyst/commit/691ec2bcbb8839446463e292856080cc9b16c584) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - update login page & error message styles
+
+- [#1506](https://github.com/bigcommerce/catalyst/pull/1506) [`ac83d3e`](https://github.com/bigcommerce/catalyst/commit/ac83d3eb98e19307a3a82fa94c222cff3c0806f0) Thanks [@bc-yevhenii-buliuk](https://github.com/bc-yevhenii-buliuk)! - remove unnecessary fields from account settings form and update confirmation message
+
+- [#1499](https://github.com/bigcommerce/catalyst/pull/1499) [`b5aea9b`](https://github.com/bigcommerce/catalyst/commit/b5aea9b36159d11a77d090fee62cb1736bc794be) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Bumps next-intl to fix issue with hashes and query params in urls.
+
+- [#1511](https://github.com/bigcommerce/catalyst/pull/1511) [`370d0b1`](https://github.com/bigcommerce/catalyst/commit/370d0b18f0f47100d7e520fcf9f209f6e41f34e9) Thanks [@bc-alexsaiannyi](https://github.com/bc-alexsaiannyi)! - update styles for reset password validation
+
+- [#1454](https://github.com/bigcommerce/catalyst/pull/1454) [`53599e6`](https://github.com/bigcommerce/catalyst/commit/53599e6e02988ab63d158c5c9f587669a5581402) Thanks [@bc-yevhenii-buliuk](https://github.com/bc-yevhenii-buliuk)! - remove unnecessary fields from create account form
+
+- [#1487](https://github.com/bigcommerce/catalyst/pull/1487) [`a22233f`](https://github.com/bigcommerce/catalyst/commit/a22233f8fc94c5ad602fa734cadbb892af34fe6b) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+## 0.17.1
+
+### Patch Changes
+
+- Updated dependencies [[`d4120d3`](https://github.com/bigcommerce/catalyst/commit/d4120d39c10398e842a7ebe14ada685ec8aae3a8)]:
+ - @bigcommerce/catalyst-client@0.11.0
+
+## 0.17.0
+
+### Minor Changes
+
+- [#1401](https://github.com/bigcommerce/catalyst/pull/1401) [`3095002`](https://github.com/bigcommerce/catalyst/commit/3095002d7a10b9c4058016076deb7a45fc8ae7bb) Thanks [@bookernath](https://github.com/bookernath)! - Add dynamic robots.txt from control panel settings
+
+### Patch Changes
+
+- [#1477](https://github.com/bigcommerce/catalyst/pull/1477) [`79e705f`](https://github.com/bigcommerce/catalyst/commit/79e705f151a733a811effed40757030aba6b6300) Thanks [@deini](https://github.com/deini)! - Breadcrumbs for top level category pages are no longer rendered
+
+- [#1467](https://github.com/bigcommerce/catalyst/pull/1467) [`e763a83`](https://github.com/bigcommerce/catalyst/commit/e763a83bcd4b8b5311586247291338eb65fbc476) Thanks [@deini](https://github.com/deini)! - Fixes an issue when a numeric product option set to a minimum <= 0 breaks the counter component.
+
+- [#1459](https://github.com/bigcommerce/catalyst/pull/1459) [`b4485c7`](https://github.com/bigcommerce/catalyst/commit/b4485c76de8c83546c68a7b50fcb7991603dbf6e) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Updates the with-routes middleware to fallback on locale based rewrite logic if the redirect is a dynamic entity redirect.
+
+- [#1469](https://github.com/bigcommerce/catalyst/pull/1469) [`8e9e7f3`](https://github.com/bigcommerce/catalyst/commit/8e9e7f3d40545004b080146b4dbb42f4ac7cf17c) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Fixes the product quantity reseting back to the previous value when adjusting the quantity fails.
+
+- [#1476](https://github.com/bigcommerce/catalyst/pull/1476) [`d47e3ac`](https://github.com/bigcommerce/catalyst/commit/d47e3aceb244713bc996287319357e6af3d865ed) Thanks [@deini](https://github.com/deini)! - adds an empty state to category pages
+
+- [#1458](https://github.com/bigcommerce/catalyst/pull/1458) [`3d67f8d`](https://github.com/bigcommerce/catalyst/commit/3d67f8d0d1776d747e9aa485b0b29a738eeacf3c) Thanks [@chanceaclark](https://github.com/chanceaclark)! - Add no-store to mutations that are rate limited.
+
+- [#1453](https://github.com/bigcommerce/catalyst/pull/1453) [`1c8b042`](https://github.com/bigcommerce/catalyst/commit/1c8b04278074eb55358a5515f330a011de9561b5) Thanks [@bc-svc-local](https://github.com/bc-svc-local)! - Update translations.
+
+- Updated dependencies [[`2d1526a`](https://github.com/bigcommerce/catalyst/commit/2d1526a50402b2eb677abd55f19fb904234d1a84)]:
+ - @bigcommerce/catalyst-client@0.10.0
+
## 0.16.0
### Minor Changes
diff --git a/core/app/[locale]/(default)/(auth)/change-password/_actions/change-password.ts b/core/app/[locale]/(default)/(auth)/change-password/_actions/change-password.ts
index c59383109..a6b3847f7 100644
--- a/core/app/[locale]/(default)/(auth)/change-password/_actions/change-password.ts
+++ b/core/app/[locale]/(default)/(auth)/change-password/_actions/change-password.ts
@@ -34,7 +34,12 @@ const ChangePasswordMutation = graphql(`
}
`);
-export const changePassword = async (_previousState: unknown, formData: FormData) => {
+interface ChangePasswordResponse {
+ status: 'success' | 'error';
+ message: string;
+}
+
+export const changePassword = async (formData: FormData): Promise => {
const t = await getTranslations('ChangePassword');
try {
@@ -61,25 +66,18 @@ export const changePassword = async (_previousState: unknown, formData: FormData
const result = response.data.customer.resetPassword;
- if (result.errors.length === 0) {
- return { status: 'success', message: '' };
+ if (result.errors.length > 0) {
+ result.errors.forEach((error) => {
+ throw new Error(error.message);
+ });
}
return {
- status: 'error',
- message: result.errors.map((error) => error.message).join('\n'),
+ status: 'success',
+ message: t('confirmChangePassword'),
};
} catch (error: unknown) {
- if (error instanceof ZodError) {
- return {
- status: 'error',
- message: error.issues
- .map(({ path, message }) => `${path.toString()}: ${message}.`)
- .join('\n'),
- };
- }
-
- if (error instanceof Error) {
+ if (error instanceof Error || error instanceof ZodError) {
return {
status: 'error',
message: error.message,
diff --git a/core/app/[locale]/(default)/(auth)/change-password/_components/change-password-form.tsx b/core/app/[locale]/(default)/(auth)/change-password/_components/change-password-form.tsx
index b4a238b03..e6b3a1484 100644
--- a/core/app/[locale]/(default)/(auth)/change-password/_components/change-password-form.tsx
+++ b/core/app/[locale]/(default)/(auth)/change-password/_components/change-password-form.tsx
@@ -1,8 +1,10 @@
'use client';
+import { AlertCircle, Check } from 'lucide-react';
import { useTranslations } from 'next-intl';
-import { ChangeEvent, useRef, useState } from 'react';
-import { useFormState, useFormStatus } from 'react-dom';
+import { ChangeEvent, useState } from 'react';
+import { useFormStatus } from 'react-dom';
+import { toast } from 'react-hot-toast';
import { Button } from '~/components/ui/button';
import {
@@ -14,10 +16,8 @@ import {
FormSubmit,
Input,
} from '~/components/ui/form';
-import { Message } from '~/components/ui/message';
import { useRouter } from '~/i18n/routing';
-import { useAccountStatusContext } from '../../../account/(tabs)/_components/account-status-provider';
import { changePassword } from '../_actions/change-password';
interface Props {
@@ -46,98 +46,91 @@ const SubmitButton = () => {
export const ChangePasswordForm = ({ customerId, customerToken }: Props) => {
const t = useTranslations('ChangePassword.Form');
- const form = useRef(null);
const router = useRouter();
- const [state, formAction] = useFormState(changePassword, {
- status: 'idle',
- message: '',
- });
const [newPassword, setNewPasssword] = useState('');
const [isConfirmPasswordValid, setIsConfirmPasswordValid] = useState(true);
- const { setAccountState } = useAccountStatusContext();
-
- let messageText = '';
-
- if (state.status === 'error') {
- messageText = state.message;
- }
const handleNewPasswordChange = (e: ChangeEvent) =>
setNewPasssword(e.target.value);
+
const handleConfirmPasswordValidation = (e: ChangeEvent) => {
const confirmPassword = e.target.value;
setIsConfirmPasswordValid(confirmPassword === newPassword);
};
- if (state.status === 'success') {
- setAccountState({ status: 'success', message: t('confirmChangePassword') });
+ const handleChangePassword = async (formData: FormData) => {
+ const { status, message } = await changePassword(formData);
+
+ if (status === 'error') {
+ toast.error(message, {
+ icon: ,
+ });
+
+ return;
+ }
+
+ toast.success(message, {
+ icon: ,
+ });
+
router.push('/login');
- }
+ };
return (
- <>
- {state.status === 'error' && (
-
-