diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-11 16:39:05 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-11 16:39:05 +0100 |
| commit | ae27a1eea6805cfff8bbb150e6f394260bc4dd17 (patch) | |
| tree | 9b4f43af76872064a366f82778bac84900900322 /animism-align/frontend/app/views/editor/footnotes/footnotes.container.js | |
| parent | 51dd8c816e80460b3e3efff433acd0ec5931ba05 (diff) | |
start footnot editor
Diffstat (limited to 'animism-align/frontend/app/views/editor/footnotes/footnotes.container.js')
| -rw-r--r-- | animism-align/frontend/app/views/editor/footnotes/footnotes.container.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/editor/footnotes/footnotes.container.js b/animism-align/frontend/app/views/editor/footnotes/footnotes.container.js new file mode 100644 index 0000000..d17f2eb --- /dev/null +++ b/animism-align/frontend/app/views/editor/footnotes/footnotes.container.js @@ -0,0 +1,39 @@ +import React, { Component } from 'react' +import { connect } from 'react-redux' + +import './footnotes.css' + +import FootnoteForm from './components/footnote.form' + +class FootnotesContainer extends Component { + render() { + const { annotation } = this.props + const { order, lookup } = annotation + const footnote_ids = order.filter(id => lookup[id].type === 'footnote') + + return ( + <div className='overview'> + <div className='project-top'> + <div className='project-heading'> + <h2>Footnotes</h2> + </div> + {footnote_ids.map((footnote_id, index) => ( + <FootnoteForm + key={footnote_id} + footnote={lookup[footnote_id]} + index={index + 1} + /> + ))} + </div> + </div> + ) + } +} + +const mapStateToProps = state => ({ + project: state.site.project, + episode: state.site.episode, + annotation: state.annotation.index, +}) + +export default connect(mapStateToProps)(FootnotesContainer) |
