dify/web/app/components/workflow/hooks/use-workflow-run.ts
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

20 lines
628 B
TypeScript

import { useHooksStore } from '@/app/components/workflow/hooks-store'
export const useWorkflowRun = () => {
const handleBackupDraft = useHooksStore((s) => s.handleBackupDraft)
const handleLoadBackupDraft = useHooksStore((s) => s.handleLoadBackupDraft)
const handleRestoreFromPublishedWorkflow = useHooksStore(
(s) => s.handleRestoreFromPublishedWorkflow,
)
const handleRun = useHooksStore((s) => s.handleRun)
const handleStopRun = useHooksStore((s) => s.handleStopRun)
return {
handleBackupDraft,
handleLoadBackupDraft,
handleRun,
handleStopRun,
handleRestoreFromPublishedWorkflow,
}
}