This commit is contained in:
Mary Hipp
2025-02-24 19:58:09 -05:00
committed by psychedelicious
parent ab4433da2f
commit 9acb24914f
5 changed files with 11 additions and 11 deletions

View File

@@ -6,13 +6,13 @@ import { atom } from 'nanostores';
import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useDeleteWorkflowMutation, workflowsApi } from 'services/api/endpoints/workflows';
import type { WorkflowRecordListItemDTO } from 'services/api/types';
import type { WorkflowRecordListItemWithThumbnailDTO } from 'services/api/types';
const $workflowToDelete = atom<WorkflowRecordListItemDTO | null>(null);
const $workflowToDelete = atom<WorkflowRecordListItemWithThumbnailDTO | null>(null);
const clearWorkflowToDelete = () => $workflowToDelete.set(null);
export const useDeleteWorkflow = () => {
const deleteWorkflow = useCallback((workflow: WorkflowRecordListItemDTO) => {
const deleteWorkflow = useCallback((workflow: WorkflowRecordListItemWithThumbnailDTO) => {
$workflowToDelete.set(workflow);
}, []);