File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export const EditDialog: FC<EditDialogProps> = ({ isOpen, onClose }) => {
51
51
< span className = "ml-1" > 账户信息</ span >
52
52
</ div >
53
53
}
54
- panel = { < InfoPanel /> }
54
+ panel = { < InfoPanel onClose = { onClose } /> }
55
55
/>
56
56
< Tab
57
57
id = "password"
@@ -61,7 +61,7 @@ export const EditDialog: FC<EditDialogProps> = ({ isOpen, onClose }) => {
61
61
< span className = "ml-1" > 密码</ span >
62
62
</ div >
63
63
}
64
- panel = { < PasswordPanel /> }
64
+ panel = { < PasswordPanel onClose = { onClose } /> }
65
65
/>
66
66
</ Tabs >
67
67
</ GlobalErrorBoundary >
@@ -70,7 +70,7 @@ export const EditDialog: FC<EditDialogProps> = ({ isOpen, onClose }) => {
70
70
)
71
71
}
72
72
73
- const InfoPanel = ( ) => {
73
+ const InfoPanel = ( { onClose } ) => {
74
74
interface FormValues {
75
75
username : string
76
76
}
@@ -109,6 +109,7 @@ const InfoPanel = () => {
109
109
intent : 'success' ,
110
110
message : `更新成功` ,
111
111
} )
112
+ onClose ( false )
112
113
} catch ( e ) {
113
114
console . warn ( e )
114
115
setError ( 'global' as any , { message : formatError ( e ) } )
@@ -149,7 +150,7 @@ const InfoPanel = () => {
149
150
)
150
151
}
151
152
152
- const PasswordPanel = ( ) => {
153
+ const PasswordPanel = ( { onClose } ) => {
153
154
interface FormValues {
154
155
original : string
155
156
newPassword : string
@@ -182,6 +183,7 @@ const PasswordPanel = () => {
182
183
intent : 'success' ,
183
184
message : `更新成功` ,
184
185
} )
186
+ onClose ( false )
185
187
} catch ( e ) {
186
188
console . warn ( e )
187
189
setError ( 'global' as any , { message : formatError ( e ) } )
You can’t perform that action at this time.
0 commit comments