feat(ui): split workflow editor settings to separate slice

We need the undoable slice to be only undoable state - settings are not undoable.
This commit is contained in:
psychedelicious
2024-05-15 17:20:51 +10:00
parent 27826369f0
commit 9c0d44b412
15 changed files with 122 additions and 84 deletions

View File

@ -13,7 +13,7 @@ import type { Connection, Node } from 'reactflow';
export const useIsValidConnection = () => {
const store = useAppStore();
const shouldValidateGraph = useAppSelector((s) => s.nodes.present.shouldValidateGraph);
const shouldValidateGraph = useAppSelector((s) => s.workflowSettings.shouldValidateGraph);
const isValidConnection = useCallback(
({ source, sourceHandle, target, targetHandle }: Connection): boolean => {
// Connection must have valid targets