aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/settings
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-07 00:30:35 +0800
committercrupest <crupest@outlook.com>2020-08-07 00:30:35 +0800
commit394842105d4ebf2d01523eae8ccf5091113f7cbd (patch)
tree3a8ed8665909001aa8c201b1d51cda2bfd4b9688 /Timeline/ClientApp/src/app/settings
parent9c0458c733ac3c7186688770045f8c41dfa235e5 (diff)
downloadtimeline-394842105d4ebf2d01523eae8ccf5091113f7cbd.tar.gz
timeline-394842105d4ebf2d01523eae8ccf5091113f7cbd.tar.bz2
timeline-394842105d4ebf2d01523eae8ccf5091113f7cbd.zip
Fix lint problem in Settings.
Diffstat (limited to 'Timeline/ClientApp/src/app/settings')
-rw-r--r--Timeline/ClientApp/src/app/settings/Settings.tsx7
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('/');
+ });
}}
/>
);