diff options
Diffstat (limited to 'src/features/workspaces/index.js')
-rw-r--r-- | src/features/workspaces/index.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js index b4cfd3c2d..50ac3b414 100644 --- a/src/features/workspaces/index.js +++ b/src/features/workspaces/index.js | |||
@@ -1,14 +1,11 @@ | |||
1 | import { observable, reaction } from 'mobx'; | 1 | import { reaction } from 'mobx'; |
2 | import { merge } from 'lodash'; | ||
3 | import WorkspacesStore from './store'; | 2 | import WorkspacesStore from './store'; |
4 | import api from './api'; | 3 | import api from './api'; |
4 | import { state, resetState } from './state'; | ||
5 | 5 | ||
6 | const debug = require('debug')('Franz:feature:workspaces'); | 6 | const debug = require('debug')('Franz:feature:workspaces'); |
7 | 7 | ||
8 | let store = null; | 8 | let store = null; |
9 | const defaultState = { workspaces: [] }; | ||
10 | |||
11 | export const state = observable(defaultState); | ||
12 | 9 | ||
13 | export default function initWorkspaces(stores, actions) { | 10 | export default function initWorkspaces(stores, actions) { |
14 | const { features, user } = stores; | 11 | const { features, user } = stores; |
@@ -27,8 +24,7 @@ export default function initWorkspaces(stores, actions) { | |||
27 | debug('Disabling `workspaces` feature'); | 24 | debug('Disabling `workspaces` feature'); |
28 | store.teardown(); | 25 | store.teardown(); |
29 | store = null; | 26 | store = null; |
30 | // Reset state to default | 27 | resetState(); // Reset state to default |
31 | merge(state, defaultState); | ||
32 | } | 28 | } |
33 | }, | 29 | }, |
34 | { | 30 | { |