1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { connect } from "react-redux";
6 import { Dispatch } from "../../../node_modules/redux";
7 import { RootState } from "../../store/store";
8 import DialogProjectCreate from "../dialog-create/dialog-project-create";
9 import actions, { createProject } from "../../store/project/project-action";
11 const mapStateToProps = (state: RootState) => ({
12 open: state.projects.creator.opened
15 const mapDispatchToProps = (dispatch: Dispatch) => ({
17 dispatch(actions.CLOSE_PROJECT_CREATOR());
19 onSubmit: (data: { name: string, description: string }) => {
20 dispatch<any>(createProject(data));
24 export default connect(mapStateToProps, mapDispatchToProps)(DialogProjectCreate);