DangerZoneContainer.ts 660 B

12345678910111213141516171819202122232425262728
  1. import { connect } from 'react-redux';
  2. import { RootState } from 'redux/interfaces';
  3. import {
  4. updateTopicPartitionsCount,
  5. updateTopicReplicationFactor,
  6. } from 'redux/reducers/topics/topicsSlice';
  7. import DangerZone from './DangerZone';
  8. type OwnProps = {
  9. defaultPartitions: number;
  10. defaultReplicationFactor: number;
  11. };
  12. const mapStateToProps = (
  13. _: RootState,
  14. { defaultPartitions, defaultReplicationFactor }: OwnProps
  15. ) => ({
  16. defaultPartitions,
  17. defaultReplicationFactor,
  18. });
  19. const mapDispatchToProps = {
  20. updateTopicPartitionsCount,
  21. updateTopicReplicationFactor,
  22. };
  23. export default connect(mapStateToProps, mapDispatchToProps)(DangerZone);