Provisioning: Delete repo config when navigating away (#110655)
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user