Skip to content

Commit 1f1e1e4

Browse files
object here too
1 parent 9938e76 commit 1f1e1e4

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

‎apps/web/src/components/GitActionsControl.tsx‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ interface PendingDefaultBranchAction {
5959

6060
type GitActionToastId = ReturnType<typeof toastManager.add>;
6161

62-
function getMenuActionDisabledReason(
63-
item: GitActionMenuItem,
64-
gitStatus: GitStatusResult | null,
65-
isBusy: boolean,
66-
hasOriginRemote: boolean,
67-
): string | null {
62+
function getMenuActionDisabledReason({
63+
item,
64+
gitStatus,
65+
isBusy,
66+
hasOriginRemote,
67+
}: {
68+
item: GitActionMenuItem;
69+
gitStatus: GitStatusResult | null;
70+
isBusy: boolean;
71+
hasOriginRemote: boolean;
72+
}): string | null {
6873
if (!item.disabled) return null;
6974
if (isBusy) return "Git action in progress.";
7075
if (!gitStatus) return "Git status is unavailable.";
@@ -654,12 +659,12 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
654659
</MenuTrigger>
655660
<MenuPopup align="end" className="w-full">
656661
{gitActionMenuItems.map((item) => {
657-
const disabledReason = getMenuActionDisabledReason(
662+
const disabledReason = getMenuActionDisabledReason({
658663
item,
659-
gitStatusForActions,
660-
isGitActionRunning,
664+
gitStatus: gitStatusForActions,
665+
isBusy: isGitActionRunning,
661666
hasOriginRemote,
662-
);
667+
});
663668
if (item.disabled && disabledReason) {
664669
return (
665670
<Popover key={`${item.id}-${item.label}`}>

0 commit comments

Comments
 (0)