import React from 'react'
import {selectVariables, selectTagStats} from '../selectors'
import {connect} from 'react-redux'
const Variable = ({data: {variable, tags}}) =>
{variable}
{Object.keys(tags).map(name => -
{name + ': ' + tags[name]}
)}
class Explorer extends React.Component {
render() {
return (
Les prélèvements sociaux sur les salaires
{this.props.variables.map((v, i) => )}
)
}
}
class TagSelect extends React.Component {
render(){
let {name, choices, number} = this.props.tag
return (
{`${name} (${number} variables)`}
{[...choices].map(c => -
{c}
)}
)
}
}
const mapStateToProps = (state) => (
{
variables: selectVariables(state),
tags: selectTagStats(state)
}
)
const VariableExplorer = connect(mapStateToProps)(Explorer)
export default VariableExplorer