12345678910111213141516171819202122232425 |
- import { connect } from 'react-redux';
- import { ClusterName, RootState, TopicName } from 'redux/interfaces';
- import { withRouter, RouteComponentProps } from 'react-router-dom';
- import Details from './Details';
- interface RouteProps {
- clusterName: ClusterName;
- topicName: TopicName;
- }
- type OwnProps = RouteComponentProps<RouteProps>;
- const mapStateToProps = (
- state: RootState,
- {
- match: {
- params: { topicName, clusterName },
- },
- }: OwnProps
- ) => ({
- clusterName,
- topicName,
- });
- export default withRouter(connect(mapStateToProps)(Details));
|