diff --git a/public/app/core/components/Signup/VerifyEmail.tsx b/public/app/core/components/Signup/VerifyEmail.tsx index dfea992a8db..9878e3a6ccc 100644 --- a/public/app/core/components/Signup/VerifyEmail.tsx +++ b/public/app/core/components/Signup/VerifyEmail.tsx @@ -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;