summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/checklist/checklist.container.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/views/viewer/checklist/checklist.container.js')
-rw-r--r--animism-align/frontend/app/views/viewer/checklist/checklist.container.js29
1 files changed, 21 insertions, 8 deletions
diff --git a/animism-align/frontend/app/views/viewer/checklist/checklist.container.js b/animism-align/frontend/app/views/viewer/checklist/checklist.container.js
index 3a441fa..7a8db0e 100644
--- a/animism-align/frontend/app/views/viewer/checklist/checklist.container.js
+++ b/animism-align/frontend/app/views/viewer/checklist/checklist.container.js
@@ -1,9 +1,11 @@
import React, { Component } from 'react'
+import { connect } from 'react-redux'
import actions from 'app/actions'
import ChecklistDropdown from './checklist.dropdown'
import ChecklistContent from './checklist.content'
+import CreditsContent from './credits.content'
class Checklist extends Component {
state = {
@@ -20,16 +22,27 @@ class Checklist extends Component {
const { currentSection } = this.state
return (
<div className="checklist">
- <ChecklistDropdown
- currentSection={currentSection}
- onChange={this.handleSectionChange}
- />
- <ChecklistContent
- currentSection={currentSection}
- />
+ (viewer.checklist && (
+ <div>
+ <ChecklistDropdown
+ currentSection={currentSection}
+ onChange={this.handleSectionChange}
+ />
+ <ChecklistContent
+ currentSection={currentSection}
+ />
+ </div>
+ )
+ (viewer.credits && (
+ <CreditsContent />
+ ))
</div>
)
}
}
-export default Checklist
+const mapStateToProps = state => ({
+ viewer: state.viewer,
+})
+
+export default connect(mapStateToProps)(Checklist)