yusuketk il y a 7 ans
Parent
commit
3503707335
2 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 5 2
      src/client/js/app.js
  2. 1 4
      src/client/js/components/PageTagForm.jsx

+ 5 - 2
src/client/js/app.js

@@ -113,7 +113,10 @@ if (isEnabledPlugins) {
   crowiPlugin.installAll(crowi, crowiRenderer);
 }
 
-// get new page tag
+/**
+ * get new tags from page tag form
+ * @param {String} tags new tags [TODO] String -> Array
+ */
 const getNewPageTags = function(tags) {
   newPageTags = tags;
 };
@@ -305,7 +308,7 @@ if (pageId) {
 if (pagePath) {
   componentMappings['page'] = <Page crowi={crowi} crowiRenderer={crowiRenderer} markdown={markdown} pagePath={pagePath} showHeadEditButton={true} onSaveWithShortcut={saveWithShortcut} />;
   componentMappings['revision-path'] = <RevisionPath pagePath={pagePath} crowi={crowi} />;
-  componentMappings['page-tag'] = <PageTagForm pageId={pageId} pageTags={currentPageTags} pagePath={pagePath} crowi={crowi} submitTags={getNewPageTags} />;
+  componentMappings['page-tag'] = <PageTagForm pageTags={currentPageTags} submitTags={getNewPageTags} />;
   componentMappings['revision-url'] = <RevisionUrl pageId={pageId} pagePath={pagePath} />;
 }
 

+ 1 - 4
src/client/js/components/PageTagForm.jsx

@@ -29,7 +29,7 @@ export default class PageTagForm extends React.Component {
     });
   }
 
-  handleSubmit(e) {
+  handleSubmit() {
     this.props.submitTags(this.state.pageTags);
   }
 
@@ -55,9 +55,6 @@ export default class PageTagForm extends React.Component {
 }
 
 PageTagForm.propTypes = {
-  crowi: PropTypes.object.isRequired,
-  pageId: PropTypes.string,
-  pagePath: PropTypes.string,
   pageTags: PropTypes.string,
   submitTags: PropTypes.func,
 };