Feature/import navigation lock (#1536)

Use navigation lock on repository import to prevent that the current user accidentally leaves the page and aborts the running import.
This commit is contained in:
Eduard Heimbuch
2021-02-16 11:35:06 +01:00
committed by GitHub
parent ac3d9c9fa1
commit 1e1b73ace5
9 changed files with 82 additions and 25 deletions

View File

@@ -75,6 +75,7 @@ const ImportRepositoryFromUrl: FC<Props> = ({ url, repositoryType, setImportPend
})
.then(response => response.json())
.then(repo => {
handleImportLoading(false);
if (history.location.pathname === currentPath) {
history.push(`/repo/${repo.namespace}/${repo.name}/code/sources`);
}