diff options
author | Ricardo Cino <ricardo@cino.io> | 2022-07-07 09:31:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 09:31:50 +0200 |
commit | 71c52373f81cace664047edd19d9d289f45a4dff (patch) | |
tree | 69b3f1d45a8b3f1ceab9497ea3c96e9dc18e3166 /src/features/workspaces/store.js | |
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/features/workspaces/store.js')
-rw-r--r-- | src/features/workspaces/store.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 9b4c4e928..e8c5d0590 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import { computed, observable, action } from 'mobx'; | 1 | import { computed, observable, action, makeObservable } from 'mobx'; |
2 | import localStorage from 'mobx-localstorage'; | 2 | import localStorage from 'mobx-localstorage'; |
3 | import matchRoute from '../../helpers/routing-helpers'; | 3 | import matchRoute from '../../helpers/routing-helpers'; |
4 | import workspaceActions from './actions'; | 4 | import workspaceActions from './actions'; |
@@ -32,6 +32,12 @@ export default class WorkspacesStore extends FeatureStore { | |||
32 | 32 | ||
33 | @observable isSettingsRouteActive = null; | 33 | @observable isSettingsRouteActive = null; |
34 | 34 | ||
35 | constructor() { | ||
36 | super(); | ||
37 | |||
38 | makeObservable(this); | ||
39 | } | ||
40 | |||
35 | @computed get workspaces() { | 41 | @computed get workspaces() { |
36 | if (!this.isFeatureActive) return []; | 42 | if (!this.isFeatureActive) return []; |
37 | return getUserWorkspacesRequest.result || []; | 43 | return getUserWorkspacesRequest.result || []; |