fix: refresh auth code shen show authcode modal

This commit is contained in:
shuai 2023-05-16 17:59:08 +08:00
parent 46138b294b
commit fb8c1fbb5f
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import React from 'react';
import { useEffect } from 'react';
import { Modal, Form, Button, InputGroup } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
@ -30,6 +30,13 @@ const Index: React.FC<IProps> = ({
}) => {
const { t } = useTranslation('translation', { keyPrefix: 'pic_auth_code' });
const { captcha, imgCode } = data;
useEffect(() => {
if (visible) {
refreshImgCode();
}
}, [visible]);
return (
<Modal size="sm" title="Captcha" show={visible} onHide={onClose} centered>
<Modal.Header closeButton>