summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/sections/viewer.sections.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/views/viewer/sections/viewer.sections.js')
-rw-r--r--animism-align/frontend/app/views/viewer/sections/viewer.sections.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/viewer/sections/viewer.sections.js b/animism-align/frontend/app/views/viewer/sections/viewer.sections.js
new file mode 100644
index 0000000..c4681b8
--- /dev/null
+++ b/animism-align/frontend/app/views/viewer/sections/viewer.sections.js
@@ -0,0 +1,47 @@
+import React, { Component } from 'react'
+// import { Link } from 'react-router-dom'
+import { connect } from 'react-redux'
+
+import actions from 'app/actions'
+import ViewerSectionsNav from './viewer.sections.nav'
+import { ROMAN_NUMERALS } from 'app/constants'
+import { thumbnailURL } from 'app/views/align/align.util'
+
+class ViewerSections extends Component {
+ componentDidMount() {
+ }
+
+ render() {
+ const { sections } = this.props
+ return (
+ <div className="viewer-sections">
+ {sections.map(section => {
+ console.log(section)
+ return (
+ <div className="viewer-section" key={section.index}>
+ <div>
+ <div className="section-thumbnail" style={{
+ backgroundImage: section.media.length && 'url(' + thumbnailURL(section.media[0]) + ')',
+ }}/>
+ <div className="section-title">
+ {ROMAN_NUMERALS[section.index]}<br />
+ {section.title}
+ </div>
+ <div className="section-media">
+ {section.media.map(media => media.type).join(', ')}
+ </div>
+ </div>
+ </div>
+ )
+ })}
+ <ViewerSectionsNav />
+ </div>
+ )
+ }
+}
+
+const mapStateToProps = state => ({
+ sections: state.viewer.sections,
+})
+
+export default connect(mapStateToProps)(ViewerSections)