import React from 'react'
import {connect} from 'react-redux'
import {getVariables} from '../selectors'
import TagNavigation from '../components/TagNavigation'
import * as actions from '../actions'
import {bindActionCreators} from 'redux'
import {getTagsToSelect} from '../selectors'
const Variable = ({variable: {variable, tags}, selectedTags}) =>
{variable}
{Object.keys(tags)
.filter(name => !selectedTags.find(([n]) => name == n))
.map(name =>
-
{name + ': ' + tags[name]}
)}
class Explorer extends React.Component {
render() {
let {variables, selectedTags, tagsToSelect, actions: {selectTag}} = this.props
return (
Liste des prélèvements sociaux sur les salaires en France
{variables.map((v, i) => )}
)
}
}
const mapStateToProps = state => (
{
variables: getVariables(state),
selectedTags: state.selectedTags,
tagsToSelect: getTagsToSelect(state)
}
)
const actionsToProps = dispatch => ({
actions: bindActionCreators(actions, dispatch)
})
const VariableExplorer = connect(mapStateToProps, actionsToProps)(Explorer)
export default VariableExplorer