All files / add-report index.js

50% Statements 2/4
100% Branches 0/0
50% Functions 2/4
50% Lines 2/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21            2x           1x                
import { connect } from 'react-redux';
import AddReport from './components/AddReport';
import { actions } from './actions';
 
// default export = container
export default connect(
  state => ({
    translations: {
      ...state.i18n.translations.reports,
    },
    reports: state.reportList.reports,
  }),
  (dispatch, props) => ({
    createReport: name => dispatch(actions.createReport(name, props.chart, props.state)),
    addToReport: id => dispatch(actions.addToReport(id, props.chart, props.state)),
  }),
)(AddReport);
 
export { actions, actionTypes } from './actions';
export middleware from './middleware';