mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com> Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Christopher Kolstad <git@chriswk.no>
20 lines
514 B
JavaScript
20 lines
514 B
JavaScript
import { connect } from 'react-redux';
|
|
|
|
import ReportCard from './ReportCard';
|
|
import { filterByProject } from '../utils';
|
|
|
|
const mapStateToProps = (state, ownProps) => {
|
|
const features = state.features.toJS();
|
|
|
|
const sameProject = filterByProject(ownProps.selectedProject);
|
|
const featuresByProject = features.filter(sameProject);
|
|
|
|
return {
|
|
features: featuresByProject,
|
|
};
|
|
};
|
|
|
|
const ReportCardContainer = connect(mapStateToProps, null)(ReportCard);
|
|
|
|
export default ReportCardContainer;
|