diff --git a/frontend/package.json b/frontend/package.json index b953c72a01..f74b7df505 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,7 +14,6 @@ "@justinribeiro/lite-youtube": "^1.3.1", "express": "^4.17.3", "file-loader": "^6.0.0", - "file-selector": "^0.2.4", "highlight.js": "^11.6.0", "joi": "^17.2.1", "lodash": "^4.17.21", @@ -27,10 +26,7 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-double-scrollbar": "^0.0.15", - "react-dropzone": "^11.5.1", - "react-hot-toast": "^1.0.1", "react-intersection-observer": "^9.4.1", - "react-social-login-buttons": "3.1.2", "semantic-ui-css": "^2.4.1", "semantic-ui-react": "^2.0.3", "swr": "^1.3.0", diff --git a/frontend/src/components/NewProject/ConflictModal.tsx b/frontend/src/components/NewProject/ConflictModal.tsx deleted file mode 100644 index 67b40a38bf..0000000000 --- a/frontend/src/components/NewProject/ConflictModal.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import React, { useContext, useEffect } from 'react' -import { Button, Form, Input, Modal } from 'semantic-ui-react' - -import useForm from '@hooks/useForm' -import ExistingProjectFromModel from '@models/ExistingProjectForm' -import { isUsableProjectName } from '@utils/giteaApi' -import { formatAsGiteaRepoName } from '@utils/index' -import { AuthContext } from '@contexts/AuthContext' - -const ConflictModal = ({ - conflictModalOpen, - onClose, - originalProjectName, - message, - onDifferentName, - onDifferentNameButtonContent, - onOverwrite, - onOverwriteButtonContent, -}: BaseConflictModalProps) => { - const { user } = useContext(AuthContext) - const { form, onChange, isValid, populate, formatErrorPrompt } = useForm( - ExistingProjectFromModel, - ) - - const [isValidProjectName, setIsValidProjectName] = React.useState(false) - - const didChangeName = originalProjectName !== form.name - const projectName = formatAsGiteaRepoName(form.name || '') - - useEffect(() => { - populate({ name: originalProjectName }) - }, [originalProjectName, populate]) - - useEffect(() => { - if (form.name && didChangeName) { - isUsableProjectName(user.username, form.name, isValid).then( - setIsValidProjectName, - ) - } - }, [user, form.name, isValid, didChangeName]) - - return ( - - A project with that name already exists. - -

{message}

-
- - -
- - {didChangeName ? ( -