mirror of
https://github.com/plankanban/planka.git
synced 2025-07-20 13:49:43 +02:00
24 lines
550 B
JavaScript
24 lines
550 B
JavaScript
|
import { bindActionCreators } from 'redux';
|
||
|
import { connect } from 'react-redux';
|
||
|
|
||
|
import { closeModal, createProject } from '../actions/entry';
|
||
|
import AddProjectModal from '../components/AddProjectModal';
|
||
|
|
||
|
const mapStateToProps = ({ project: { data: defaultData, isSubmitting } }) => ({
|
||
|
defaultData,
|
||
|
isSubmitting,
|
||
|
});
|
||
|
|
||
|
const mapDispatchToProps = (dispatch) => bindActionCreators(
|
||
|
{
|
||
|
onCreate: createProject,
|
||
|
onClose: closeModal,
|
||
|
},
|
||
|
dispatch,
|
||
|
);
|
||
|
|
||
|
export default connect(
|
||
|
mapStateToProps,
|
||
|
mapDispatchToProps,
|
||
|
)(AddProjectModal);
|