Skip to content
Snippets Groups Projects
Commit 2cb4f507 authored by john's avatar john
Browse files

resolve merge conflict

parents c3d8d4e5 d8801fd2
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,6 @@ export default class SimpleEditor extends React.Component {
const el = ReactDOM.findDOMNode(this)
const { book, fileUpload, fragment, history, onSave, update, user } = this.props
const { configurator, documentSession } = this.createSession()
if (!fragment) return
......@@ -152,6 +151,7 @@ export default class SimpleEditor extends React.Component {
const updateTrackChangesStatus = this.updateTrackChangesStatus
const disabled = !this.state.canEdit
// TODO -- justify
this.setState({
config: configurator.config
})
......@@ -171,6 +171,7 @@ export default class SimpleEditor extends React.Component {
updateTrackChangesStatus,
user
}, el)
// TODO -- pull all above into its own function
window.addEventListener('beforeunload', this._releaseLock)
}
......@@ -225,6 +226,7 @@ export default class SimpleEditor extends React.Component {
SimpleEditor.propTypes = {
book: React.PropTypes.object.isRequired,
canEdit: React.PropTypes.bool, // needed?
fragment: React.PropTypes.object,
history: React.PropTypes.object.isRequired,
onSave: React.PropTypes.func.isRequired,
......
......@@ -84,13 +84,14 @@ export class SimpleEditorWrapper extends React.Component {
}
}
// TODO -- review required props
SimpleEditorWrapper.propTypes = {
actions: React.PropTypes.object.isRequired,
book: React.PropTypes.object.isRequired,
fragment: React.PropTypes.object,
history: React.PropTypes.object.isRequired,
update: React.PropTypes.func,
user: React.PropTypes.object.isRequired
user: React.PropTypes.object.isRequired,
update: React.PropTypes.func
}
const mapStateToProps = (state, ownProps) => {
......
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