Fetch clone modal data on first opening (#1784)

Get the data of the clone modal the first time it is opened. This way, we display a loading spinner for a fraction of a second when the modal is first opened. But we also prevent fetching a lot of data that is probably not needed.
This commit is contained in:
Eduard Heimbuch
2021-08-31 07:39:02 +02:00
committed by GitHub
parent cf55b15d21
commit 58f792a285
2 changed files with 19 additions and 15 deletions

View File

@@ -81,21 +81,23 @@ const RepositoryEntry: FC<Props> = ({ repository, baseDate }) => {
const createContentRight = () => (
<ContentRightContainer>
<Modal
size="L"
active={openCloneModal}
title={t("overview.clone")}
body={
<ExtensionPoint
name="repos.repository-details.information"
renderAll={true}
props={{
repository,
}}
/>
}
closeFunction={() => setOpenCloneModal(false)}
/>
{openCloneModal && (
<Modal
size="L"
active={openCloneModal}
title={t("overview.clone")}
body={
<ExtensionPoint
name="repos.repository-details.information"
renderAll={true}
props={{
repository,
}}
/>
}
closeFunction={() => setOpenCloneModal(false)}
/>
)}
<QuickActionbar>
<QuickAction
name="download"