add error message handler, add request animation

This commit is contained in:
smanylov
2026-03-04 17:16:30 +07:00
parent a11abdbb56
commit b8c439d2d7
8 changed files with 65 additions and 14 deletions
@@ -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
+10 -1
View File
@@ -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>
)
+13 -4
View File
@@ -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>
)
@@ -5,8 +5,6 @@ import { useTranslations } from 'next-intl';
export function FileInfoModalWindow({ fileInfo, setWindowClose, setWindowChildren }: any) {
const t = useTranslations('Global');
console.log(fileInfo);
return (
<div className="modal-window-view-file">
<div className="modal-window-view-file-header">