aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/workspaces/components/WorkspaceSwitchingIndicator.js')
-rw-r--r--src/features/workspaces/components/WorkspaceSwitchingIndicator.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
index c8ec0bc4c..33a82cf4b 100644
--- a/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
+++ b/src/features/workspaces/components/WorkspaceSwitchingIndicator.js
@@ -4,14 +4,14 @@ import { observer } from 'mobx-react';
4import injectSheet from 'react-jss'; 4import injectSheet from 'react-jss';
5import classnames from 'classnames'; 5import classnames from 'classnames';
6import { Loader } from '@meetfranz/ui'; 6import { Loader } from '@meetfranz/ui';
7import { defineMessages, intlShape } from 'react-intl'; 7import { defineMessages, injectIntl } from 'react-intl';
8 8
9import { workspaceStore } from '../index'; 9import { workspaceStore } from '../index';
10 10
11const messages = defineMessages({ 11const messages = defineMessages({
12 switchingTo: { 12 switchingTo: {
13 id: 'workspaces.switchingIndicator.switchingTo', 13 id: 'workspaces.switchingIndicator.switchingTo',
14 defaultMessage: '!!!Switching to', 14 defaultMessage: 'Switching to',
15 }, 15 },
16}); 16});
17 17
@@ -61,13 +61,9 @@ class WorkspaceSwitchingIndicator extends Component {
61 theme: PropTypes.object.isRequired, 61 theme: PropTypes.object.isRequired,
62 }; 62 };
63 63
64 static contextTypes = {
65 intl: intlShape,
66 };
67
68 render() { 64 render() {
69 const { classes, theme } = this.props; 65 const { classes, theme } = this.props;
70 const { intl } = this.context; 66 const { intl } = this.props;
71 const { isSwitchingWorkspace, nextWorkspace } = workspaceStore; 67 const { isSwitchingWorkspace, nextWorkspace } = workspaceStore;
72 if (!isSwitchingWorkspace) return null; 68 if (!isSwitchingWorkspace) return null;
73 const nextWorkspaceName = nextWorkspace 69 const nextWorkspaceName = nextWorkspace
@@ -89,4 +85,4 @@ class WorkspaceSwitchingIndicator extends Component {
89 } 85 }
90} 86}
91 87
92export default WorkspaceSwitchingIndicator; 88export default injectIntl(WorkspaceSwitchingIndicator);