diff options
author | 2022-07-07 09:31:50 +0200 | |
---|---|---|
committer | 2022-07-07 09:31:50 +0200 | |
commit | 71c52373f81cace664047edd19d9d289f45a4dff (patch) | |
tree | 69b3f1d45a8b3f1ceab9497ea3c96e9dc18e3166 /src/stores/UserStore.ts | |
parent | 6.0.0-nightly.91 [skip ci] (diff) | |
download | ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.tar.gz ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.tar.zst ferdium-app-71c52373f81cace664047edd19d9d289f45a4dff.zip |
chore: Mobx & React-Router upgrade (#406)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/stores/UserStore.ts')
-rw-r--r-- | src/stores/UserStore.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stores/UserStore.ts b/src/stores/UserStore.ts index b9c3c7576..c5e67c966 100644 --- a/src/stores/UserStore.ts +++ b/src/stores/UserStore.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { observable, computed, action } from 'mobx'; | 1 | import { observable, computed, action, makeObservable } from 'mobx'; |
2 | import moment from 'moment'; | 2 | import moment from 'moment'; |
3 | import jwt from 'jsonwebtoken'; | 3 | import jwt from 'jsonwebtoken'; |
4 | import localStorage from 'mobx-localstorage'; | 4 | import localStorage from 'mobx-localstorage'; |
@@ -93,6 +93,8 @@ export default class UserStore extends TypedStore { | |||
93 | constructor(stores: Stores, api: ApiInterface, actions: Actions) { | 93 | constructor(stores: Stores, api: ApiInterface, actions: Actions) { |
94 | super(stores, api, actions); | 94 | super(stores, api, actions); |
95 | 95 | ||
96 | makeObservable(this); | ||
97 | |||
96 | // Register action handlers | 98 | // Register action handlers |
97 | this.actions.user.login.listen(this._login.bind(this)); | 99 | this.actions.user.login.listen(this._login.bind(this)); |
98 | this.actions.user.retrievePassword.listen( | 100 | this.actions.user.retrievePassword.listen( |