|
|
@@ -12,6 +12,7 @@ import EditorContainer from '~/client/services/EditorContainer';
|
|
|
import RenderTagLabels from './RenderTagLabels';
|
|
|
import TagEditModal from './TagEditModal';
|
|
|
|
|
|
+
|
|
|
class TagLabels extends React.Component {
|
|
|
|
|
|
constructor(props) {
|
|
|
@@ -57,8 +58,8 @@ class TagLabels extends React.Component {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- const { tags } = await appContainer.apiPost('/tags.update', { pageId, tags: newTags });
|
|
|
-
|
|
|
+ const { tags, updatedBy } = await appContainer.apiPost('/tags.update', { pageId, tags: newTags });
|
|
|
+ console.log(`tags object is :${tags} and ${updatedBy}`);
|
|
|
// update pageContainer.state
|
|
|
pageContainer.setState({ tags });
|
|
|
// update editorContainer.state
|
|
|
@@ -69,6 +70,9 @@ class TagLabels extends React.Component {
|
|
|
catch (err) {
|
|
|
toastError(err, 'fail to update tags');
|
|
|
}
|
|
|
+ pageContainer.updateStateAfterTagAdded();
|
|
|
+ // TODO あとで消す
|
|
|
+ console.log('Tag is added');
|
|
|
}
|
|
|
|
|
|
|