소스 검색

clean code

Yuki Takei 6 년 전
부모
커밋
c01b3006ba
1개의 변경된 파일12개의 추가작업 그리고 1개의 파일을 삭제
  1. 12 1
      src/client/js/components/PageAttachment/PageAttachmentList.jsx

+ 12 - 1
src/client/js/components/PageAttachment/PageAttachmentList.jsx

@@ -1,5 +1,5 @@
-/* eslint-disable react/prop-types */
 import React from 'react';
 import React from 'react';
+import PropTypes from 'prop-types';
 
 
 import Attachment from './Attachment';
 import Attachment from './Attachment';
 
 
@@ -35,3 +35,14 @@ export default class PageAttachmentList extends React.Component {
   }
   }
 
 
 }
 }
+
+PageAttachmentList.propTypes = {
+  attachments: PropTypes.arrayOf(PropTypes.object),
+  inUse: PropTypes.objectOf(PropTypes.bool),
+  onAttachmentDeleteClicked: PropTypes.func,
+  isUserLoggedIn: PropTypes.bool,
+};
+PageAttachmentList.defaultProps = {
+  attachments: [],
+  inUse: {},
+};