"fix" VerifyEmailPage tests

This commit is contained in:
Ashley Harrison
2025-12-08 17:06:18 +00:00
parent 3ef28b727f
commit 470cd869f3
@@ -1,4 +1,5 @@
import { useState } from 'react';
import { flushSync } from 'react-dom';
import { useForm } from 'react-hook-form';
import { Trans, t } from '@grafana/i18n';
@@ -25,7 +26,10 @@ export const VerifyEmail = () => {
getBackendSrv()
.post('/api/user/signup', formModel)
.then(() => {
setEmailSent(true);
// TODO why?
flushSync(() => {
setEmailSent(true);
});
})
.catch((err) => {
const msg = err.data?.message || err;