File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
atcoder-problems-frontend/src/pages/Internal/MyAccountPage Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -17,20 +17,18 @@ import { updateUserInfo } from "./ApiClient";
1717
1818export const MyAccountPage = ( ) : JSX . Element => {
1919 const loginState = useLoginState ( ) ;
20- const [ isUpdating , setIsUpdating ] = useState ( false ) ;
21- const [ isValidResponse , setIsValidResponse ] = useState < boolean > ( ) ;
2220
2321 const [ userId , setUserId ] = useState ( "" ) ;
22+ const [ isUpdating , setIsUpdating ] = useState ( false ) ;
23+ const [ isValidResponse , setIsValidResponse ] = useState < boolean > ( ) ;
2424 const { path } = useRouteMatch ( ) ;
2525 const { pathname } = useLocation ( ) ;
2626
2727 const handleSubmit = async ( userId : string ) => {
2828 setIsUpdating ( true ) ;
29-
3029 await updateUserInfo ( userId ) . then ( ( response ) => {
3130 setIsValidResponse ( response . status === 200 ) ;
3231 } ) ;
33-
3432 setIsUpdating ( false ) ;
3533 } ;
3634
@@ -91,7 +89,7 @@ export const MyAccountPage = (): JSX.Element => {
9189 < UserIdUpdate
9290 userId = { userId }
9391 setUserId = { setUserId }
94- onSubmit = { async ( ) => handleSubmit ( userId ) }
92+ onSubmit = { ( ) => handleSubmit ( userId ) }
9593 status = { isUpdating ? "updating" : updated ? "updated" : "open" }
9694 />
9795 </ Route >
You can’t perform that action at this time.
0 commit comments