fix(ui): download button in workflow library downloads wrong workflow

This commit is contained in:
psychedelicious
2025-03-01 08:43:42 +10:00
committed by Kent Keirsey
parent 4c86a7ecbf
commit c5b8bde285
5 changed files with 51 additions and 7 deletions

View File

@@ -1,12 +1,12 @@
import { MenuItem } from '@invoke-ai/ui-library';
import { useDownloadWorkflow } from 'features/workflowLibrary/hooks/useDownloadWorkflow';
import { useDownloadCurrentlyLoadedWorkflow } from 'features/workflowLibrary/hooks/useDownloadCurrentlyLoadedWorkflow';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { PiDownloadSimpleBold } from 'react-icons/pi';
const DownloadWorkflowMenuItem = () => {
const { t } = useTranslation();
const downloadWorkflow = useDownloadWorkflow();
const downloadWorkflow = useDownloadCurrentlyLoadedWorkflow();
return (
<MenuItem as="button" icon={<PiDownloadSimpleBold />} onClick={downloadWorkflow}>