fix jumping ui in repository settings actions

This commit is contained in:
Eduard Heimbuch
2020-12-16 11:52:24 +01:00
parent 214cf527d4
commit 92232c0b4c
2 changed files with 38 additions and 40 deletions

View File

@@ -62,30 +62,29 @@ const ArchiveRepo: FC<Props> = ({ confirmDialog = true, repository, archiveRepo,
return null;
}
if (showConfirmAlert) {
return (
<ConfirmAlert
title={t("archiveRepo.confirmAlert.title")}
message={t("archiveRepo.confirmAlert.message")}
buttons={[
{
className: "is-outlined",
label: t("archiveRepo.confirmAlert.submit"),
onClick: () => archiveRepoCallback(),
},
{
label: t("archiveRepo.confirmAlert.cancel"),
onClick: () => null,
},
]}
close={() => setShowConfirmAlert(false)}
/>
);
}
const confirmAlert = (
<ConfirmAlert
title={t("archiveRepo.confirmAlert.title")}
message={t("archiveRepo.confirmAlert.message")}
buttons={[
{
className: "is-outlined",
label: t("archiveRepo.confirmAlert.submit"),
onClick: () => archiveRepoCallback(),
},
{
label: t("archiveRepo.confirmAlert.cancel"),
onClick: () => null,
},
]}
close={() => setShowConfirmAlert(false)}
/>
);
return (
<>
<ErrorNotification error={error} />
{showConfirmAlert && confirmAlert}
<Level
left={
<p>