Pass down the repository type, because the RepositoryDto needs it for validation

This commit is contained in:
Sebastian Sdorra
2020-12-03 10:44:23 +01:00
parent 8a31fd58a2
commit d0c84dec69
2 changed files with 4 additions and 2 deletions

View File

@@ -32,14 +32,15 @@ import { useHistory } from "react-router-dom";
type Props = {
url: string;
repositoryType: string;
setImportPending: (pending: boolean) => void;
};
const ImportRepositoryFromUrl: FC<Props> = ({ url, setImportPending }) => {
const ImportRepositoryFromUrl: FC<Props> = ({ url, repositoryType, setImportPending }) => {
const [repo, setRepo] = useState<RepositoryUrlImport>({
name: "",
namespace: "",
type: "",
type: repositoryType,
contact: "",
description: "",
importUrl: "",