aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/workspaces/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/workspaces/components')
-rw-r--r--src/features/workspaces/components/WorkspaceDrawer.js11
-rw-r--r--src/features/workspaces/components/WorkspaceSwitchingIndicator.js4
2 files changed, 10 insertions, 5 deletions
diff --git a/src/features/workspaces/components/WorkspaceDrawer.js b/src/features/workspaces/components/WorkspaceDrawer.js
index c18eb0e11..6dc779be9 100644
--- a/src/features/workspaces/components/WorkspaceDrawer.js
+++ b/src/features/workspaces/components/WorkspaceDrawer.js
@@ -6,9 +6,9 @@ import { defineMessages, intlShape } from 'react-intl';
6import { H1, Icon } from '@meetfranz/ui'; 6import { H1, Icon } from '@meetfranz/ui';
7import ReactTooltip from 'react-tooltip'; 7import ReactTooltip from 'react-tooltip';
8 8
9import { workspacesState } from '../state';
10import WorkspaceDrawerItem from './WorkspaceDrawerItem'; 9import WorkspaceDrawerItem from './WorkspaceDrawerItem';
11import { workspaceActions } from '../actions'; 10import { workspaceActions } from '../actions';
11import { workspaceStore } from '../index';
12 12
13const messages = defineMessages({ 13const messages = defineMessages({
14 headline: { 14 headline: {
@@ -70,7 +70,12 @@ class WorkspaceDrawer extends Component {
70 getServicesForWorkspace, 70 getServicesForWorkspace,
71 } = this.props; 71 } = this.props;
72 const { intl } = this.context; 72 const { intl } = this.context;
73 const { activeWorkspace, isSwitchingWorkspace, nextWorkspace } = workspacesState; 73 const {
74 activeWorkspace,
75 isSwitchingWorkspace,
76 nextWorkspace,
77 workspaces,
78 } = workspaceStore;
74 const actualWorkspace = isSwitchingWorkspace ? nextWorkspace : activeWorkspace; 79 const actualWorkspace = isSwitchingWorkspace ? nextWorkspace : activeWorkspace;
75 return ( 80 return (
76 <div className={classes.drawer}> 81 <div className={classes.drawer}>
@@ -95,7 +100,7 @@ class WorkspaceDrawer extends Component {
95 services={getServicesForWorkspace(null)} 100 services={getServicesForWorkspace(null)}
96 isActive={actualWorkspace == null} 101 isActive={actualWorkspace == null}
97 /> 102 />
98 {workspacesState.workspaces.map(workspace => ( 103 {workspaces.map(workspace => (
99 <WorkspaceDrawerItem 104 <WorkspaceDrawerItem
100 key={workspace.id} 105 key={workspace.id}
101 name={workspace.name} 106 name={workspace.name}
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
index 68ce6fd87..c012ab008 100644
--- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
+++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
@@ -5,8 +5,8 @@ import injectSheet from 'react-jss';
5import classnames from 'classnames'; 5import classnames from 'classnames';
6import { defineMessages, intlShape } from 'react-intl'; 6import { defineMessages, intlShape } from 'react-intl';
7 7
8import { workspacesState } from '../state';
9import LoaderComponent from '../../../components/ui/Loader'; 8import LoaderComponent from '../../../components/ui/Loader';
9import { workspaceStore } from '../index';
10 10
11const messages = defineMessages({ 11const messages = defineMessages({
12 switchingTo: { 12 switchingTo: {
@@ -56,7 +56,7 @@ class WorkspaceSwitchingIndicator extends Component {
56 render() { 56 render() {
57 const { classes } = this.props; 57 const { classes } = this.props;
58 const { intl } = this.context; 58 const { intl } = this.context;
59 const { isSwitchingWorkspace, isWorkspaceDrawerOpen, nextWorkspace } = workspacesState; 59 const { isSwitchingWorkspace, isWorkspaceDrawerOpen, nextWorkspace } = workspaceStore;
60 if (!isSwitchingWorkspace) return null; 60 if (!isSwitchingWorkspace) return null;
61 const nextWorkspaceName = nextWorkspace ? nextWorkspace.name : 'All services'; 61 const nextWorkspaceName = nextWorkspace ? nextWorkspace.name : 'All services';
62 return ( 62 return (