feat: disable eagle for no image feed
This commit is contained in:
parent
fbb27e2c2a
commit
aa85395436
|
|
@ -27,14 +27,16 @@ export function EntryContextMenu({
|
|||
<ContextMenu>
|
||||
<ContextMenuTrigger className="w-full">{children}</ContextMenuTrigger>
|
||||
<ContextMenuContent onClick={(e) => e.stopPropagation()}>
|
||||
{items[view].map((item) => (
|
||||
<ContextMenuItem
|
||||
key={item.name}
|
||||
onClick={() => execAction(item.action)}
|
||||
>
|
||||
{item.name}
|
||||
</ContextMenuItem>
|
||||
))}
|
||||
{items[view]
|
||||
.filter((item) => !item.disabled)
|
||||
.map((item) => (
|
||||
<ContextMenuItem
|
||||
key={item.name}
|
||||
onClick={() => execAction(item.action)}
|
||||
>
|
||||
{item.name}
|
||||
</ContextMenuItem>
|
||||
))}
|
||||
</ContextMenuContent>
|
||||
</ContextMenu>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ export const useEntryActions = ({
|
|||
name: "Save Images to Eagle",
|
||||
icon: "/eagle.svg",
|
||||
action: "save-to-eagle",
|
||||
disabled: checkEagle.isLoading ? true : !checkEagle.data,
|
||||
disabled:
|
||||
(checkEagle.isLoading ? true : !checkEagle.data) || !images?.length,
|
||||
},
|
||||
{
|
||||
name: "Share",
|
||||
|
|
|
|||
Loading…
Reference in New Issue