chore: bump version to 2.21.7 in package.json and enhance captcha handling in auth components

- Updated application version from 2.21.6 to 2.21.7 in package.json.
- Improved conditional rendering for captcha loading states in PasswordResetRequestContainer, PasswordSignInForm, and ResendAuthLinkForm components to enhance user experience during authentication processes.
This commit is contained in:
gbuomprisco
2025-12-02 21:59:08 +08:00
parent f6c635aac3
commit 7aa79e501e
4 changed files with 16 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "next-supabase-saas-kit-turbo", "name": "next-supabase-saas-kit-turbo",
"version": "2.21.6", "version": "2.21.7",
"private": true, "private": true,
"sideEffects": false, "sideEffects": false,
"engines": { "engines": {

View File

@@ -107,9 +107,18 @@ export function PasswordResetRequestContainer(params: {
type="submit" type="submit"
> >
<If <If
condition={captchaLoading} condition={
fallback={<Trans i18nKey={'auth:passwordResetLabel'} />} !resetPasswordMutation.isPending && !captchaLoading
}
> >
<Trans i18nKey={'auth:passwordResetLabel'} />
</If>
<If condition={resetPasswordMutation.isPending}>
<Trans i18nKey={'auth:passwordResetLabel'} />
</If>
<If condition={captchaLoading}>
<Trans i18nKey={'auth:verifyingCaptcha'} /> <Trans i18nKey={'auth:verifyingCaptcha'} />
</If> </If>
</Button> </Button>

View File

@@ -134,7 +134,7 @@ export function PasswordSignInForm({
</span> </span>
</If> </If>
<If condition={!redirecting && !loading}> <If condition={!redirecting && !loading && !captchaLoading}>
<span className={'animate-out fade-out flex items-center'}> <span className={'animate-out fade-out flex items-center'}>
<Trans i18nKey={'auth:signInWithEmail'} /> <Trans i18nKey={'auth:signInWithEmail'} />

View File

@@ -94,7 +94,9 @@ export function ResendAuthLinkForm(props: {
<Trans i18nKey={'auth:resendingLink'} /> <Trans i18nKey={'auth:resendingLink'} />
</If> </If>
<If condition={!resendLink.isPending && !captchaLoading}>
<Trans i18nKey={'auth:resendLink'} defaults={'Resend Link'} /> <Trans i18nKey={'auth:resendLink'} defaults={'Resend Link'} />
</If>
</Button> </Button>
</form> </form>