2017-11-05 23:59:18 +00:00
|
|
|
import React from 'react'
|
|
|
|
import { connect } from 'react-redux'
|
2017-11-13 23:39:08 +00:00
|
|
|
import { setCurrentChapter } from '../actions'
|
2017-11-05 23:59:18 +00:00
|
|
|
|
2017-12-11 03:43:32 +00:00
|
|
|
const JoyceReaderContent = ({currentDocument, highlightActive}) =>
|
2017-11-22 20:17:27 +00:00
|
|
|
<div id="page" className={highlightActive ? 'show_notes' : 'hide_notes'}>
|
2017-12-11 03:43:32 +00:00
|
|
|
<div dangerouslySetInnerHTML={{__html: currentDocument.text}} />
|
2017-11-22 03:52:32 +00:00
|
|
|
</div>
|
2017-11-05 23:59:18 +00:00
|
|
|
|
|
|
|
const mapStateToProps = state => {
|
|
|
|
return {
|
2017-12-11 03:43:32 +00:00
|
|
|
currentDocument: state.currentDocument,
|
2017-11-22 20:17:27 +00:00
|
|
|
highlightActive: state.highlightActive
|
2017-11-05 23:59:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-09 19:02:54 +00:00
|
|
|
const JoyceReaderContentContainer = connect(mapStateToProps)(JoyceReaderContent)
|
2017-11-05 23:59:18 +00:00
|
|
|
|
2017-12-09 19:02:54 +00:00
|
|
|
export default JoyceReaderContentContainer
|