Skip to content
Snippets Groups Projects
Commit 4d814f7e authored by john's avatar john
Browse files

fix editor not reloading

parent 7b4157c4
No related branches found
No related tags found
No related merge requests found
...@@ -217,8 +217,8 @@ export default class SimpleEditor extends React.Component { ...@@ -217,8 +217,8 @@ export default class SimpleEditor extends React.Component {
} }
SimpleEditor.propTypes = { SimpleEditor.propTypes = {
book: React.PropTypes.object.isRequired, book: React.PropTypes.object,
canEdit: React.PropTypes.bool, // needed? // canEdit: React.PropTypes.bool, // needed?
fragment: React.PropTypes.object, fragment: React.PropTypes.object,
history: React.PropTypes.object.isRequired, history: React.PropTypes.object.isRequired,
onSave: React.PropTypes.func.isRequired, onSave: React.PropTypes.func.isRequired,
......
...@@ -17,11 +17,11 @@ export class SimpleEditorWrapper extends React.Component { ...@@ -17,11 +17,11 @@ export class SimpleEditorWrapper extends React.Component {
} }
componentWillMount () { componentWillMount () {
const { book, actions } = this.props const { getCollections, getFragments } = this.props.actions
const { getCollections, getFragments } = actions
// TODO: might not need to fetch all the collections? // TODO: might not need to fetch all the collections?
getCollections().then(() => { getCollections().then(() => {
const { book } = this.props
getFragments(book) getFragments(book)
}) })
...@@ -93,7 +93,7 @@ export class SimpleEditorWrapper extends React.Component { ...@@ -93,7 +93,7 @@ export class SimpleEditorWrapper extends React.Component {
// TODO -- review required props // TODO -- review required props
SimpleEditorWrapper.propTypes = { SimpleEditorWrapper.propTypes = {
actions: React.PropTypes.object.isRequired, actions: React.PropTypes.object.isRequired,
book: React.PropTypes.object.isRequired, book: React.PropTypes.object,
fragment: React.PropTypes.object, fragment: React.PropTypes.object,
history: React.PropTypes.object.isRequired, history: React.PropTypes.object.isRequired,
user: React.PropTypes.object.isRequired user: React.PropTypes.object.isRequired
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment