aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/settings/Settings.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-07 00:32:35 +0800
committerGitHub <noreply@github.com>2020-08-07 00:32:35 +0800
commit394ba7b875e93ec571f92e808ec0ec80298d8a23 (patch)
tree7b308196520523bf178c2b3e2351544948fa238f /Timeline/ClientApp/src/app/settings/Settings.tsx
parentc04f513f9a7cdbb406181e2c3112b3af73a3e249 (diff)
parent3405e9d98e9e31a656e0da71992e5460874658be (diff)
downloadtimeline-394ba7b875e93ec571f92e808ec0ec80298d8a23.tar.gz
timeline-394ba7b875e93ec571f92e808ec0ec80298d8a23.tar.bz2
timeline-394ba7b875e93ec571f92e808ec0ec80298d8a23.zip
Merge pull request #134 from crupest/offline-user
Make user offline usable.
Diffstat (limited to 'Timeline/ClientApp/src/app/settings/Settings.tsx')
-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('/');
+ });
}}
/>
);