ListContainer.ts 620 B

1234567891011121314151617181920
  1. import { connect } from 'react-redux';
  2. import {ClusterName, RootState} from 'redux/interfaces';
  3. import { getConsumerGroupsList } from 'redux/reducers/consumerGroups/selectors';
  4. import List from './List';
  5. import { withRouter, RouteComponentProps } from 'react-router-dom';
  6. interface RouteProps {
  7. clusterName: ClusterName;
  8. }
  9. interface OwnProps extends RouteComponentProps<RouteProps> { }
  10. const mapStateToProps = (state: RootState, { match: { params: { clusterName } } }: OwnProps) => ({
  11. clusterName,
  12. consumerGroups: getConsumerGroupsList(state)
  13. });
  14. export default withRouter(
  15. connect(mapStateToProps)(List)
  16. );