From ae27a1eea6805cfff8bbb150e6f394260bc4dd17 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 11 Mar 2021 16:39:05 +0100 Subject: start footnot editor --- .../views/editor/footnotes/footnotes.container.js | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 animism-align/frontend/app/views/editor/footnotes/footnotes.container.js (limited to 'animism-align/frontend/app/views/editor/footnotes/footnotes.container.js') 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 ( +
+
+
+

Footnotes

+
+ {footnote_ids.map((footnote_id, index) => ( + + ))} +
+
+ ) + } +} + +const mapStateToProps = state => ({ + project: state.site.project, + episode: state.site.episode, + annotation: state.annotation.index, +}) + +export default connect(mapStateToProps)(FootnotesContainer) -- cgit v1.2.3-70-g09d2