|
|
@@ -11,6 +11,7 @@ import EditorContainer from '~/client/services/EditorContainer';
|
|
|
|
|
|
import RenderTagLabels from './RenderTagLabels';
|
|
|
import TagEditModal from './TagEditModal';
|
|
|
+import { EditorMode } from '~/stores/ui';
|
|
|
|
|
|
class TagLabels extends React.Component {
|
|
|
|
|
|
@@ -33,7 +34,7 @@ class TagLabels extends React.Component {
|
|
|
*/
|
|
|
getTagData() {
|
|
|
const { editorContainer, pageContainer, editorMode } = this.props;
|
|
|
- return (editorMode === 'edit') ? editorContainer.state.tags : pageContainer.state.tags;
|
|
|
+ return (editorMode === EditorMode.Editor) ? editorContainer.state.tags : pageContainer.state.tags;
|
|
|
}
|
|
|
|
|
|
openEditorModal() {
|
|
|
@@ -116,7 +117,7 @@ TagLabels.propTypes = {
|
|
|
pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
|
|
|
editorContainer: PropTypes.instanceOf(EditorContainer).isRequired,
|
|
|
|
|
|
- editorMode: PropTypes.string.isRequired,
|
|
|
+ editorMode: PropTypes.string,
|
|
|
};
|
|
|
|
|
|
export default withTranslation()(TagLabelsWrapper);
|