Commit fb8828e2 authored by Jure's avatar Jure

Adjust naming of uploadFile.

parent 5d003817
...@@ -9,6 +9,7 @@ class Writer extends React.Component { ...@@ -9,6 +9,7 @@ class Writer extends React.Component {
constructor (props) { constructor (props) {
super(props) super(props)
this.save = this.save.bind(this) this.save = this.save.bind(this)
this.uploadFile = this.uploadFile.bind(this)
} }
save (content, callback) { save (content, callback) {
...@@ -20,9 +21,8 @@ class Writer extends React.Component { ...@@ -20,9 +21,8 @@ class Writer extends React.Component {
callback(null, content) callback(null, content)
} }
fileUpload (file, callback) { uploadFile (file, callback) {
console.log(this.props.fileUpload) return this.props.uploadFile(file, callback)
return callback(null, null)
} }
render () { render () {
...@@ -40,7 +40,7 @@ class Writer extends React.Component { ...@@ -40,7 +40,7 @@ class Writer extends React.Component {
editor = <LensWriter editor = <LensWriter
content={content} content={content}
onSave={this.save} onSave={this.save}
onFileUpload={this.fileUpload} onUploadFile={this.uploadFile}
/> />
} else { } else {
editor = <p>Loading</p> editor = <p>Loading</p>
...@@ -55,7 +55,7 @@ class Writer extends React.Component { ...@@ -55,7 +55,7 @@ class Writer extends React.Component {
Writer.propTypes = { Writer.propTypes = {
fragment: React.PropTypes.object, fragment: React.PropTypes.object,
save: React.PropTypes.func, save: React.PropTypes.func,
fileUpload: React.PropTypes.func uploadFile: React.PropTypes.func
} }
export default Writer export default Writer
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"lens": "substance/lens#969d3f0f1c1b13361317986ea91cc5dfc1073748", "lens": "substance/lens#a2567ce46f9ef32f5939cc02a3ec45c8841e9d83",
"react-router-bootstrap": "^0.19.0", "react-router-bootstrap": "^0.19.0",
"node-sass": "^3.1.2", "node-sass": "^3.1.2",
"react": "^0.14.0", "react": "^0.14.0",
......
Markdown is supported
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