This pull request introduces several changes to the frontend codebase, primarily focusing on updating the flow management and integrating a new hook for updating node code. The key changes involve exporting interfaces, creating a new hook, and modifying the CodeAreaModal component to utilize the new hook.
This pull request introduces several changes to the frontend codebase, primarily focusing on updating the flow management and integrating a new hook for updating node code. The key changes involve exporting interfaces, creating a new hook, and modifying the
CodeAreaModal
component to utilize the new hook.Key Changes:
Interfaces and Hooks:
src/frontend/src/controllers/API/queries/flows/use-patch-update-flow.ts
: Exported theIPatchUpdateFlow
interface to make it accessible in other parts of the application.src/frontend/src/modals/codeAreaModal/hooks/use-update-node-code.tsx
: Created a new hookuseFlowUpdate
to handle updating nodes within a flow. This hook uses theIPatchUpdateFlow
interface and integrates with thepatchUpdateFlow
mutation.Component Modifications:
src/frontend/src/modals/codeAreaModal/index.tsx
:useFlowUpdate
and theusePatchUpdateFlow
mutation. [1] [2]componentId
to theCodeAreaModal
component.updateNodeInFlow
function from theuseFlowUpdate
hook to update the node data when the code is validated. [1] [2]src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx
: Passed thecomponentId
prop to theCodeAreaModal
component.Type Definitions:
src/frontend/src/types/components/index.ts
: Added thecomponentId
property to thecodeAreaModalPropsType
type definition to support the new functionality.