diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-10-09 16:25:08 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-10-09 16:25:08 +0200 |
| commit | 3499c61481bd6c5e9081814f959f38c5d0f5c68d (patch) | |
| tree | 02f221f74735ffd3ffdd62061bcf0cc566d6e103 /animism-align/frontend/app/views/viewer/checklist/checklist.container.js | |
| parent | 008c10e0a1abde2bbc22b6b6f265ac23c14d8b19 (diff) | |
width of these elements
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.js | 29 |
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) |
