All files / hourly-chart index.js

100% Statements 7/7
100% Branches 0/0
100% Functions 6/6
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26        1x 3x     3x         3x 1x 1x                    
import { connect } from 'react-redux';
import { actions } from './reducer';
import HourlyChart from './components/HourlyChart';
 
const findSelectedMetric = (metrics, selectedMetric) =>
  metrics.find(metric => metric.label === selectedMetric);
 
export default connect(
  state => ({
    ...state.hourly,
    selectedMetricData: findSelectedMetric(state.hourly.metrics, state.hourly.selectedMetric),
    profileService: state.profiles.selectedProfileService,
  }),
  dispatch => ({
    toggleDropdown: () => dispatch(actions.toggleDropdown()),
    selectMetric: metric => dispatch(actions.selectMetric(metric)),
  }),
)(HourlyChart);
 
 
export { ChartContent } from './components/HourlyChart';
export Title from './components/Title';
// export reducer, actions and action types
export reducer, { actions, actionTypes } from './reducer';
export middleware from './middleware';