Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { useState, useEffect } from 'react';
import cx from 'classnames';
import socket from '@src/socket';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { Form, Input, Button } from '@alifd/next';
import Modal from '@components/Modal';
import Icon from '@components/Icon';
import SelectWorkFolderModal from '@components/SelectWorkFolderModal';
import useModal from '@hooks/useModal';
import styles from './index.module.scss';
const FormItem = Form.Item;
const FormSubmit = Form.Submit;
const formItemLayout = {
labelCol: {
fixedSpan: 5,
},
};
const CreateProjectModal = ({ on, onCancel, onOk, isBiz, loading }) => {
const {
on: onSelectModal,
setModal: setSelectModal,
} = useModal();
const [data, setData] = useState({ name: '', appId: '', changeId: '', path: '', workFolder: '' });
function onSave(values, errors) {
if (!errors) {