mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
add toggle button for sites
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux'
|
||||
import { bindActionCreators } from 'redux'
|
||||
import * as actions from '../actions'
|
||||
import * as selectors from '../selectors'
|
||||
|
||||
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
|
||||
import Search from './Search.jsx';
|
||||
import TagListPanel from './TagListPanel.jsx';
|
||||
// import ToolbarBottomActions from './ToolbarBottomActions.jsx';
|
||||
import ToolbarBottomActions from './ToolbarBottomActions.jsx';
|
||||
import copy from '../js/data/copy.json';
|
||||
import { trimAndEllipse } from '../js/utilities.js';
|
||||
|
||||
@@ -112,7 +114,6 @@ class Toolbar extends React.Component {
|
||||
{this.renderToolbarTab(0, 'Focus stories')}
|
||||
{this.renderToolbarTab(1, 'Explore freely')}
|
||||
</div>
|
||||
{/* <ToolbarBottomActions /> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -124,7 +125,7 @@ class Toolbar extends React.Component {
|
||||
{this.renderClosePanel()}
|
||||
<Tabs selectedIndex={this.state._selected}>
|
||||
{this.renderToolbarNarrativePanel()}
|
||||
{this.renderToolbarTagPanel()}
|
||||
{/* {this.renderToolbarTagPanel()} */}
|
||||
</Tabs>
|
||||
</div>
|
||||
)
|
||||
@@ -159,7 +160,12 @@ class Toolbar extends React.Component {
|
||||
{this.renderToolbarTab(0, 'Narratives')}
|
||||
{(isTags) ? this.renderToolbarTab(1, 'Explore by tag') : ''}
|
||||
</div>
|
||||
{/* <ToolbarBottomActions /> */}
|
||||
<ToolbarBottomActions
|
||||
sites={{
|
||||
enabled: this.props.sitesShowing,
|
||||
toggle: this.props.actions.toggleSites,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -187,7 +193,14 @@ function mapStateToProps(state) {
|
||||
viewFilters: state.app.filters.views,
|
||||
features: state.app.features,
|
||||
narrative: state.app.narrative,
|
||||
sitesShowing: state.app.flags.isShowingSites
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Toolbar)
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators(actions, dispatch)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Toolbar)
|
||||
|
||||
Reference in New Issue
Block a user