commit
38fd490b21
2 changed files with 7 additions and 3 deletions
|
|
@ -13,8 +13,12 @@ const EditDocument = ({ doc, history }) => (doc ? (
|
||||||
</div>
|
</div>
|
||||||
) : <NotFound />);
|
) : <NotFound />);
|
||||||
|
|
||||||
|
EditDocument.defaultProps = {
|
||||||
|
doc: null,
|
||||||
|
};
|
||||||
|
|
||||||
EditDocument.propTypes = {
|
EditDocument.propTypes = {
|
||||||
doc: PropTypes.object.isRequired,
|
doc: PropTypes.object,
|
||||||
history: PropTypes.object.isRequired,
|
history: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ const ViewDocument = ({ loading, doc, match, history }) => (
|
||||||
|
|
||||||
ViewDocument.propTypes = {
|
ViewDocument.propTypes = {
|
||||||
loading: PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
doc: PropTypes.object.isRequired,
|
doc: PropTypes.object,
|
||||||
match: PropTypes.object.isRequired,
|
match: PropTypes.object.isRequired,
|
||||||
history: PropTypes.object.isRequired,
|
history: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
@ -55,6 +55,6 @@ export default createContainer(({ match }) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
loading: !subscription.ready(),
|
loading: !subscription.ready(),
|
||||||
doc: Documents.findOne(documentId) || {},
|
doc: Documents.findOne(documentId),
|
||||||
};
|
};
|
||||||
}, ViewDocument);
|
}, ViewDocument);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue