fix: removed redundant custom menu (#6388)

This commit is contained in:
Vamsi Krishna 2025-01-15 16:00:26 +05:30 committed by GitHub
parent 76fdb81249
commit 75d14e7c3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,43 +114,7 @@ export const WorkspaceViewQuickActions: React.FC<Props> = observer((props) => {
<ContextMenu parentRef={parentRef} items={MENU_ITEMS} />
<CustomMenu customButton={customButton} placement="bottom-end" menuItemsClassName="z-20" closeOnSelect>
{MENU_ITEMS.map((item) => {
if (item.shouldRender === false) return null;
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
item.action();
}}
className={cn(
"flex items-center gap-2",
{
"text-custom-text-400": item.disabled,
},
item.className
)}
disabled={item.disabled}
>
{item.icon && <item.icon className={cn("h-3 w-3", item.iconClassName)} />}
<div>
<h5>{item.title}</h5>
{item.description && (
<p
className={cn("text-custom-text-300 whitespace-pre-line", {
"text-custom-text-400": item.disabled,
})}
>
{item.description}
</p>
)}
</div>
</CustomMenu.MenuItem>
);
})}
</CustomMenu>
{customButton}
</>
);
});