summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/checklist/checklist.container.js
blob: 3a441fa8c4324157832fdd1dbe9c9f5a3de2907a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React, { Component } from 'react'

import actions from 'app/actions'

import ChecklistDropdown from './checklist.dropdown'
import ChecklistContent from './checklist.content'

class Checklist extends Component {
  state = {
    currentSection: 'all',
  }
  constructor(props) {
    super(props)
    this.handleSectionChange = this.handleSectionChange.bind(this)
  }
  handleSectionChange(currentSection) {
    this.setState({ currentSection })
  }
  render() {
    const { currentSection } = this.state
    return (
      <div className="checklist">
        <ChecklistDropdown
          currentSection={currentSection}
          onChange={this.handleSectionChange}
        />
        <ChecklistContent
          currentSection={currentSection}
        />
      </div>
    )
  }
}

export default Checklist