diff --git a/packages/twenty-front/src/modules/applications/components/AppMenuItem.tsx b/packages/twenty-front/src/modules/applications/components/AppMenuItem.tsx index dc1316090d..461fde08ad 100644 --- a/packages/twenty-front/src/modules/applications/components/AppMenuItem.tsx +++ b/packages/twenty-front/src/modules/applications/components/AppMenuItem.tsx @@ -1,5 +1,6 @@ import { AppChip } from '@/applications/components/AppChip'; import { useApplicationChipData } from '@/applications/hooks/useApplicationChipData'; +import { type ReactNode } from 'react'; import { MenuItem } from 'twenty-ui/navigation'; type AppMenuItemProps = { @@ -8,6 +9,7 @@ type AppMenuItemProps = { onClick?: () => void; focused?: boolean; disabled?: boolean; + RightComponent?: ReactNode; }; export const AppMenuItem = ({ @@ -16,6 +18,7 @@ export const AppMenuItem = ({ onClick, focused, disabled, + RightComponent, }: AppMenuItemProps) => { const { applicationChipData } = useApplicationChipData({ applicationId, @@ -32,6 +35,7 @@ export const AppMenuItem = ({ onClick={onClick} focused={focused} disabled={disabled} + RightComponent={RightComponent} /> ); }; diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx index dca66eae5b..df2acf1da7 100644 --- a/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx +++ b/packages/twenty-front/src/modules/command-menu-item/display/components/CommandMenuItemRenderer.tsx @@ -118,6 +118,15 @@ const CommandMenuItemSelectableRenderer = ({ handleClick(); }; + const loaderComponent = + disabled && showDisabledLoader ? ( + isDefined(progress) ? ( + + ) : ( + + ) + ) : undefined; + if (isThirdPartyApp) { return ( @@ -127,21 +136,13 @@ const CommandMenuItemSelectableRenderer = ({ onClick={disabled ? undefined : handleClick} focused={!disabled && isSelectedItemId} disabled={disabled} + RightComponent={loaderComponent} /> ); } if (displayType === 'listItem') { - const loaderComponent = - disabled && showDisabledLoader ? ( - isDefined(progress) ? ( - - ) : ( - - ) - ) : undefined; - return (