|
@@ -29,16 +29,13 @@ const DefaultAvatar = ({ color = "#1296db" }) => (
|
29
|
29
|
);
|
30
|
30
|
|
31
|
31
|
const ChangePassword = forwardRef((props, ref) => {
|
32
|
|
- const { user } = props;
|
33
|
32
|
|
34
|
33
|
const [visible, setVisible] = useState(false);
|
35
|
34
|
|
36
|
35
|
const onFinish = async (values) => {
|
37
|
|
- // console.log('---values---->', values)
|
38
|
36
|
const data = {
|
39
|
37
|
password: values.newPassword,
|
40
|
38
|
};
|
41
|
|
- // console.log('---ff---->', data)
|
42
|
39
|
await changePassword(data);
|
43
|
40
|
|
44
|
41
|
return true;
|
|
@@ -109,11 +106,10 @@ export default (props) => {
|
109
|
106
|
passRef.current.show();
|
110
|
107
|
}
|
111
|
108
|
};
|
112
|
|
-console.log(user)
|
113
|
109
|
return (
|
114
|
110
|
<Dropdown menu={{ items, onClick }}>
|
115
|
111
|
<div className="user-info">
|
116
|
|
- <Avatar size={24} src={user?.account || <DefaultAvatar />} />
|
|
112
|
+ <Avatar size={24} src={<DefaultAvatar />} />
|
117
|
113
|
<span className="font">{user?.userName}</span>
|
118
|
114
|
<ChangePassword user={user} ref={passRef} />
|
119
|
115
|
</div>
|