Provisioning: Delete repo config when navigating away (#110655)

This commit is contained in:
Alex Khomenko
2025-09-05 17:32:26 +03:00
committed by GitHub
parent c4bc83019d
commit 439fefeda8
@@ -170,6 +170,14 @@ export function ProvisioningWizard({ type }: { type: RepoType }) {
}
};
const onDiscard = async () => {
if (repoName) {
await handleRepositoryDeletion(repoName);
}
await handlePrevious();
};
const handlePrevious = async () => {
// For cancel actions, show confirmation modal
if (shouldUseCancelBehavior) {
@@ -333,7 +341,7 @@ export function ProvisioningWizard({ type }: { type: RepoType }) {
<div className={styles.divider} />
<form onSubmit={handleSubmit(onSubmit)} className={styles.form}>
<FormPrompt
onDiscard={handlePrevious}
onDiscard={onDiscard}
confirmRedirect={isDirty && !['connection', 'finish'].includes(activeStep) && !isCancelling}
/>
<Stack direction="column">