mirror of https://gitee.com/answerdev/answer.git
Merge pull request #460 from answerdev/feat/1.1.1/ui
fix(useCaptchaModal): Add `await` to all `close()` calls to prevent t…
This commit is contained in:
commit
c3b2e305ba
|
@ -37,8 +37,8 @@ const Index: React.FC<IProps> = () => {
|
|||
};
|
||||
}
|
||||
resendEmail(req)
|
||||
.then(() => {
|
||||
emailCaptcha.close();
|
||||
.then(async () => {
|
||||
await emailCaptcha.close();
|
||||
setSuccess(true);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
@ -49,8 +49,8 @@ const Index = () => {
|
|||
}
|
||||
|
||||
getSearchResult(params)
|
||||
.then((resp) => {
|
||||
searchCaptcha.close();
|
||||
.then(async (resp) => {
|
||||
await searchCaptcha.close();
|
||||
setData(resp);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
@ -105,8 +105,8 @@ const Index: React.FC<Props> = ({ callback }) => {
|
|||
}
|
||||
|
||||
register(reqParams)
|
||||
.then((res) => {
|
||||
emailCaptcha.close();
|
||||
.then(async (res) => {
|
||||
await emailCaptcha.close();
|
||||
updateUser(res);
|
||||
callback();
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue