diff --git a/frontend/src/components/repo/BranchSwitcher.tsx b/frontend/src/components/repo/BranchSwitcher.tsx index f4c0a8a5..ebfbd178 100644 --- a/frontend/src/components/repo/BranchSwitcher.tsx +++ b/frontend/src/components/repo/BranchSwitcher.tsx @@ -83,7 +83,7 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep {!iconOnly && {activeBranch}} - + {isWorktree ? ( <> @@ -110,31 +110,6 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep ) : ( <> - {branchesLoading && !branches ? ( - - Loading branches... - - ) : branches?.all && branches.all.length > 0 ? ( - branches.all.map((branch: string) => ( - switchBranchMutation.mutate(branch)} - disabled={switchBranchMutation.isPending} - className="text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer" - > -
- - {branch} - {branch === activeBranch && } -
-
- )) - ) : ( - - No branches available - - )} - setGitChangesOpen(true)} className="text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer" @@ -163,6 +138,33 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep )} + +
+ {branchesLoading && !branches ? ( + + Loading branches... + + ) : branches?.all && branches.all.length > 0 ? ( + branches.all.map((branch: string) => ( + switchBranchMutation.mutate(branch)} + disabled={switchBranchMutation.isPending} + className="text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer" + > +
+ + {branch} + {branch === activeBranch && } +
+
+ )) + ) : ( + + No branches available + + )} +
)}