From f9265436af1775b34458e067974d28c3f992fa09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mih=C3=A1ly=20Lengyel?= Date: Wed, 31 Jul 2024 16:27:31 +0200 Subject: [PATCH] fix: the error prop updates in override components (#842) * fix: error prop memoization * chore: update version number --- CHANGELOG.md | 4 ++++ lib/build/emailpasswordprebuiltui.js | 4 ++-- lib/build/thirdpartyprebuiltui.js | 2 +- .../recipe/emailpassword/components/features/signin/index.tsx | 2 +- .../recipe/emailpassword/components/features/signup/index.tsx | 2 +- .../thirdparty/components/features/signInAndUp/index.tsx | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 848acf057..ad6d2c361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated the font and font-weights in the default styles - We no longer load the Rubik font by default +### Fixes + +- Now the error prop should be updated in override components. + ## [0.44.0] - 2024-07-15 - Removes the default `maxAgeInSeconds` value (previously 300 seconds) in EmailVerification Claim. If the claim value is true and `maxAgeInSeconds` is not provided, it will not be refreshed. diff --git a/lib/build/emailpasswordprebuiltui.js b/lib/build/emailpasswordprebuiltui.js index b660998e2..f0e7253a8 100644 --- a/lib/build/emailpasswordprebuiltui.js +++ b/lib/build/emailpasswordprebuiltui.js @@ -936,7 +936,7 @@ function useChildProps$1(recipe$1, error, onError, clearError, userContext, navi userContext: userContext, }; }, - [recipe$1] + [recipe$1, error, userContext] ); } var SignInFeature = function (props) { @@ -1187,7 +1187,7 @@ function useChildProps(recipe$1, error, onError, clearError, userContext, naviga clearError: clearError, }; }, - [recipe$1] + [recipe$1, error, userContext] ); } var SignUpFeature = function (props) { diff --git a/lib/build/thirdpartyprebuiltui.js b/lib/build/thirdpartyprebuiltui.js index d691eb3e0..3aa7ac4c8 100644 --- a/lib/build/thirdpartyprebuiltui.js +++ b/lib/build/thirdpartyprebuiltui.js @@ -226,7 +226,7 @@ function useChildProps(recipe$1, error, onError, clearError, rebuildAuthPage, se userContext: userContext, }; }, - [recipe$1, recipeImplementation] + [recipe$1, recipeImplementation, error, userContext] ); } var SignInAndUpFeature = function (props) { diff --git a/lib/ts/recipe/emailpassword/components/features/signin/index.tsx b/lib/ts/recipe/emailpassword/components/features/signin/index.tsx index 7aa06621b..3a7a09119 100644 --- a/lib/ts/recipe/emailpassword/components/features/signin/index.tsx +++ b/lib/ts/recipe/emailpassword/components/features/signin/index.tsx @@ -141,7 +141,7 @@ export function useChildProps( onForgotPasswordClick: onForgotPasswordClick, userContext, }; - }, [recipe]); + }, [recipe, error, userContext]); } export const SignInFeature: React.FC< diff --git a/lib/ts/recipe/emailpassword/components/features/signup/index.tsx b/lib/ts/recipe/emailpassword/components/features/signup/index.tsx index 1bb3f7653..43f236a5b 100644 --- a/lib/ts/recipe/emailpassword/components/features/signup/index.tsx +++ b/lib/ts/recipe/emailpassword/components/features/signup/index.tsx @@ -122,7 +122,7 @@ export function useChildProps( onError, clearError, }; - }, [recipe]); + }, [recipe, error, userContext]); } export const SignUpFeature: React.FC< diff --git a/lib/ts/recipe/thirdparty/components/features/signInAndUp/index.tsx b/lib/ts/recipe/thirdparty/components/features/signInAndUp/index.tsx index 2d955bc38..c19ac7f4f 100644 --- a/lib/ts/recipe/thirdparty/components/features/signInAndUp/index.tsx +++ b/lib/ts/recipe/thirdparty/components/features/signInAndUp/index.tsx @@ -72,7 +72,7 @@ export function useChildProps( navigate, userContext, }; - }, [recipe, recipeImplementation]); + }, [recipe, recipeImplementation, error, userContext]); } type PropType = PartialAuthComponentProps & {