mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-04 20:45:52 +01:00
Keep state even if import pending changes
This commit is contained in:
@@ -48,6 +48,20 @@ type Props = {
|
||||
fetchNamespaceStrategiesIfNeeded: () => void;
|
||||
};
|
||||
|
||||
const ImportPendingLoading = ({ importPending }: { importPending: boolean }) => {
|
||||
const [t] = useTranslation("repos");
|
||||
if (!importPending) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Notification type="info">{t("import.pending.infoText")}</Notification>
|
||||
<Loading />
|
||||
<hr />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const ImportRepository: FC<Props> = ({
|
||||
repositoryTypes,
|
||||
pageLoading,
|
||||
@@ -92,13 +106,7 @@ const ImportRepository: FC<Props> = ({
|
||||
error={error}
|
||||
showContentOnError={true}
|
||||
>
|
||||
{importPending && (
|
||||
<>
|
||||
<Notification type="info">{t("import.pending.infoText")}</Notification>
|
||||
<Loading />
|
||||
<hr />
|
||||
</>
|
||||
)}
|
||||
<ImportPendingLoading importPending={importPending} />
|
||||
<ImportRepositoryTypeSelect
|
||||
repositoryTypes={repositoryTypes}
|
||||
repositoryType={repositoryType}
|
||||
|
||||
Reference in New Issue
Block a user