Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: change emial need confirm password

shuai73598e8af63d
diff --git a/ui/src/pages/Users/Settings/Account/components/ModifyEmail/index.tsx b/ui/src/pages/Users/Settings/Account/components/ModifyEmail/index.tsx
index 173cbfd6..ff1a58ca 100644
--- a/ui/src/pages/Users/Settings/Account/components/ModifyEmail/index.tsx
+++ b/ui/src/pages/Users/Settings/Account/components/ModifyEmail/index.tsx
@@ -52,12 +52,6 @@ const Index: FC = () => {
});
};
- useEffect(() => {
- if (step > 1) {
- getImgCode();
- }
- }, [step]);
-
const handleChange = (params: Type.FormDataType) => {
setFormData({ ...formData, ...params });
};
@@ -172,7 +166,12 @@ const Index: FC = () => {
/>
</Form.Group>
- <Button variant="outline-secondary" onClick={() => setStep(2)}>
+ <Button
+ variant="outline-secondary"
+ onClick={() => {
+ setStep(2);
+ getImgCode();
+ }}>
{t('change_email_btn')}
</Button>
</Form>