Skip to content

Commit 2054732

Browse files
authored
fix(git-interaction): reset isSubmitting flag on PR creation cancel (#3131)
1 parent 1ab94c9 commit 2054732

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/ui/src/features/git-interaction/state/gitInteractionStore.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,15 @@ export const useGitInteractionStore = create<GitInteractionStore>()(
194194
prBody: existingDraft?.prBody ?? "",
195195
isGeneratingCommitMessage: false,
196196
isGeneratingPr: false,
197+
isSubmitting: false,
197198
activeCreatePrDraftKey: draftKey,
198199
});
199200
},
200201
closeCreatePr: () => {
201202
const state = get();
202203
const key = state.activeCreatePrDraftKey;
203204
if (key === null) {
204-
set({ createPrOpen: false });
205+
set({ createPrOpen: false, isSubmitting: false });
205206
return;
206207
}
207208
const snapshot: CreatePrDraftValues = {
@@ -220,6 +221,7 @@ export const useGitInteractionStore = create<GitInteractionStore>()(
220221
createPrOpen: false,
221222
createPrDrafts: nextDrafts,
222223
activeCreatePrDraftKey: null,
224+
isSubmitting: false,
223225
});
224226
},
225227
setCreatePrStep: (step) => set({ createPrStep: step }),

0 commit comments

Comments
 (0)