Commit e662884b authored by Yannis Barlas's avatar Yannis Barlas
Browse files

working button for viewing collection in vivliostyle

parent ede7222d
...@@ -163,17 +163,16 @@ export class BookBuilder extends React.Component { ...@@ -163,17 +163,16 @@ export class BookBuilder extends React.Component {
} }
handleHTMLToEpub (bookId) { handleHTMLToEpub (bookId) {
const { htmlToEpub } = this.props.actions
const { book } = this.props const { book } = this.props
const { htmlToEpub } = this.props.actions
htmlToEpub(book.id).then((res) => { htmlToEpub(book.id).then((res) => {
console.log('res', res) const path = res.extractedEpubPath
const path = res.path const url = `
const url = 'localhost:3000/vivliostyle/viewer/vivliostyle-viewer.html#b=' + path /vivliostyle/viewer/vivliostyle-viewer.html#b=/uploads/${path}
// this.props.history.push() `
window.location = '/vivliostyle/viewer/vivliostyle-viewer.html#b=/uploads/' + path window.open(url, '_blank')
}) })
// console.log('props', this.props)
// console.log('actions', this.props.actions)
} }
render () { render () {
......
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