diff options
Diffstat (limited to 'animism-align/frontend/app/views/align/components/sidebar')
| -rw-r--r-- | animism-align/frontend/app/views/align/components/sidebar/script.component.js | 23 | ||||
| -rw-r--r-- | animism-align/frontend/app/views/align/components/sidebar/tableOfContents.component.js | 30 |
2 files changed, 0 insertions, 53 deletions
diff --git a/animism-align/frontend/app/views/align/components/sidebar/script.component.js b/animism-align/frontend/app/views/align/components/sidebar/script.component.js deleted file mode 100644 index 6c20dfa..0000000 --- a/animism-align/frontend/app/views/align/components/sidebar/script.component.js +++ /dev/null @@ -1,23 +0,0 @@ -import React, { Component } from 'react' -// import { Link } from 'react-router-dom' -import { bindActionCreators } from 'redux' -import { connect } from 'react-redux' - -import actions from 'app/actions' - -const Script = ({ text }) => { - if (text.loading) return null - return ( - <textarea - className='script' - onChange={e => actions.site.updateText(e.target.value)} - value={text} - /> - ) -} - -const mapStateToProps = state => ({ - text: state.site.text, -}) - -export default connect(mapStateToProps)(Script) diff --git a/animism-align/frontend/app/views/align/components/sidebar/tableOfContents.component.js b/animism-align/frontend/app/views/align/components/sidebar/tableOfContents.component.js deleted file mode 100644 index 34aedb5..0000000 --- a/animism-align/frontend/app/views/align/components/sidebar/tableOfContents.component.js +++ /dev/null @@ -1,30 +0,0 @@ -import React, { Component } from 'react' -// import { Link } from 'react-router-dom' -import { bindActionCreators } from 'redux' -import { connect } from 'react-redux' - -import { ROMAN_NUMERALS } from 'app/constants' -import actions from 'app/actions' - -class TableOfContents extends Component { - render() { - const { loading, order, lookup } = this.props.annotation - if (loading || !order) return null - const sectionIds = order.filter(id => lookup[id].type === "section_heading") - return ( - <div className="toc"> - {sectionIds.map((id, i) => ( - <div key={id} onClick={() => actions.align.setScrollPosition(lookup[id].start_ts)}> - {ROMAN_NUMERALS[i]}{'. '}{lookup[id].text} - </div> - ))} - </div> - ) - } -} - -const mapStateToProps = state => ({ - annotation: state.annotation.index, -}) - -export default connect(mapStateToProps)(TableOfContents) |
