File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
ui/packages/shared/pages/Branches
components/Modals/DeleteBranchModal Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ export class MainStore {
91
91
title : 'Error' ,
92
92
message : `Branch "${ branchId } " not found` ,
93
93
}
94
+ this . isBranchesLoading = false
94
95
}
95
96
96
97
return ! ! currentBranch
@@ -101,6 +102,10 @@ export class MainStore {
101
102
102
103
const { response, error } = await this . api . deleteBranch ( branchName )
103
104
105
+ if ( response ) {
106
+ this . branches =
107
+ this . branches ?. filter ( ( branch ) => branch . name !== branchName ) || [ ]
108
+ }
104
109
105
110
return { response, error }
106
111
}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export const DeleteBranchModal = ({
44
44
if ( deleteRes ?. error ) {
45
45
setDeleteError ( deleteRes . error ?. message )
46
46
} else {
47
- window . location . reload ( )
47
+ window . location . replace ( '/instance/branches' )
48
48
}
49
49
}
50
50
You can’t perform that action at this time.
0 commit comments