From 20b1e7a4774f8448baa7abdd2e52553c2336005c Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 2 Dec 2020 16:07:42 +0100 Subject: [PATCH] Keep state even if import pending changes --- .../src/repos/containers/ImportRepository.tsx | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/scm-ui/ui-webapp/src/repos/containers/ImportRepository.tsx b/scm-ui/ui-webapp/src/repos/containers/ImportRepository.tsx index bc7631db68..05187b0eba 100644 --- a/scm-ui/ui-webapp/src/repos/containers/ImportRepository.tsx +++ b/scm-ui/ui-webapp/src/repos/containers/ImportRepository.tsx @@ -48,6 +48,20 @@ type Props = { fetchNamespaceStrategiesIfNeeded: () => void; }; +const ImportPendingLoading = ({ importPending }: { importPending: boolean }) => { + const [t] = useTranslation("repos"); + if (!importPending) { + return null; + } + return ( + <> + {t("import.pending.infoText")} + +
+ + ); +}; + const ImportRepository: FC = ({ repositoryTypes, pageLoading, @@ -92,13 +106,7 @@ const ImportRepository: FC = ({ error={error} showContentOnError={true} > - {importPending && ( - <> - {t("import.pending.infoText")} - -
- - )} +