NewContainer.ts 440 B

12345678910111213141516
  1. import { connect } from 'react-redux';
  2. import { RootState } from 'redux/interfaces';
  3. import { createSchema } from 'redux/actions';
  4. import { getSchemaCreated } from 'redux/reducers/schemas/selectors';
  5. import New from './New';
  6. const mapStateToProps = (state: RootState) => ({
  7. isSchemaCreated: getSchemaCreated(state),
  8. });
  9. const mapDispatchToProps = {
  10. createSchema,
  11. };
  12. export default connect(mapStateToProps, mapDispatchToProps)(New);