add error message handler, add request animation
This commit is contained in:
@@ -115,7 +115,12 @@ export default function ConfirmMailModalWindow({ userId, email, onClose }: { use
|
||||
className={`${styles['btn']}`}
|
||||
disabled={confirmCodeValue.length !== 6 || isPending}
|
||||
>
|
||||
{isPending ? t('confirming') : t('confirm')}
|
||||
{t('confirm')}
|
||||
{isPending && (
|
||||
<div className="loading-animation">
|
||||
<div className="global-spinner"></div>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
|
||||
<button
|
||||
|
||||
@@ -31,8 +31,17 @@ export default function ForgotPasswordForm() {
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<button type="submit" className={`${styles['btn']}`}>
|
||||
<button
|
||||
type="submit"
|
||||
className={`${styles['btn']}`}
|
||||
disabled={isPending}
|
||||
>
|
||||
{t('recover-password')}
|
||||
{isPending && (
|
||||
<div className="loading-animation">
|
||||
<div className="global-spinner"></div>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
</form>
|
||||
)
|
||||
|
||||
@@ -194,13 +194,22 @@ export default function ResetPasswordForm() {
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
{/* {state?.error.server && (
|
||||
{formState?.error?.server && (
|
||||
<p className={`${styles['form-error']}`}>
|
||||
{t(state?.error.server)}
|
||||
{t(formState?.error?.server)}
|
||||
</p>
|
||||
)} */}
|
||||
<button type="submit" className={`${styles['btn']}`}>
|
||||
)}
|
||||
<button
|
||||
type="submit"
|
||||
className={`${styles['btn']}`}
|
||||
disabled={isPending}
|
||||
>
|
||||
{t('change-password')}
|
||||
{isPending && (
|
||||
<div className="loading-animation">
|
||||
<div className="global-spinner"></div>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
</form>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user