diff options
author | crupest <crupest@outlook.com> | 2020-08-07 00:30:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-07 00:30:35 +0800 |
commit | 3405e9d98e9e31a656e0da71992e5460874658be (patch) | |
tree | 7b308196520523bf178c2b3e2351544948fa238f | |
parent | b9ce9127f336a2017056f863e01ff789f57ac83f (diff) | |
download | timeline-3405e9d98e9e31a656e0da71992e5460874658be.tar.gz timeline-3405e9d98e9e31a656e0da71992e5460874658be.tar.bz2 timeline-3405e9d98e9e31a656e0da71992e5460874658be.zip |
Fix lint problem in Settings.
-rw-r--r-- | Timeline/ClientApp/src/app/settings/Settings.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Timeline/ClientApp/src/app/settings/Settings.tsx b/Timeline/ClientApp/src/app/settings/Settings.tsx index a247557d..13e6f4f3 100644 --- a/Timeline/ClientApp/src/app/settings/Settings.tsx +++ b/Timeline/ClientApp/src/app/settings/Settings.tsx @@ -81,7 +81,7 @@ const ChangePasswordDialog: React.FC<ChangePasswordDialogProps> = (props) => { await userService
.changePassword(oldPassword as string, newPassword as string)
.toPromise();
- userService.logout();
+ await userService.logout();
setRedirect(true);
}}
close={() => {
@@ -204,8 +204,9 @@ const Settings: React.FC = (_) => { <ConfirmLogoutDialog
toggle={() => setDialog(null)}
onConfirm={() => {
- userService.logout();
- history.push('/');
+ void userService.logout().then(() => {
+ history.push('/');
+ });
}}
/>
);
|