Remove workflow context + clean action config (#13919)
- Remove create related version and runs from workflow action config - Remove WorkflowStepContextProvider. Use states instead
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import { workflowVisualizerWorkflowVersionIdComponentState } from '@/workflow/states/workflowVisualizerWorkflowVersionIdComponentState';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
export const useWorkflowVersionIdOrThrow = () => {
|
||||
const workflowVersionId = useRecoilComponentValue(
|
||||
workflowVisualizerWorkflowVersionIdComponentState,
|
||||
);
|
||||
|
||||
if (!isDefined(workflowVersionId)) {
|
||||
throw new Error('Expected the workflow version ID to be defined');
|
||||
}
|
||||
|
||||
return workflowVersionId;
|
||||
};
|
||||
Reference in New Issue
Block a user