Skip to content

Commit 96759ed

Browse files
committed
revert: code refactor
1 parent 2ca8aae commit 96759ed

File tree

1 file changed

+4
-7
lines changed
  • samples/apps/autogen-studio/frontend/src/components/views/builder

1 file changed

+4
-7
lines changed

samples/apps/autogen-studio/frontend/src/components/views/builder/workflow.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ const WorkflowView = ({}: any) => {
3838
React.useState<IFlowConfig | null>(null);
3939

4040
const defaultConfig = sampleWorkflowConfig();
41-
const [newWorkflow, setNewWorkflow] = React.useState<IFlowConfig | null>(
42-
defaultConfig
43-
);
41+
const [newWorkflow] = React.useState<IFlowConfig | null>(defaultConfig);
4442

4543
const [showWorkflowModal, setShowWorkflowModal] = React.useState(false);
4644
const [showNewWorkflowModal, setShowNewWorkflowModal] = React.useState(false);
@@ -195,7 +193,7 @@ const WorkflowView = ({}: any) => {
195193
handler,
196194
}: {
197195
workflow: IFlowConfig | null;
198-
setWorkflow: (workflow: IFlowConfig | null) => void;
196+
setWorkflow?: (workflow: IFlowConfig | null) => void;
199197
showWorkflowModal: boolean;
200198
setShowWorkflowModal: (show: boolean) => void;
201199
handler?: (workflow: IFlowConfig) => void;
@@ -207,7 +205,7 @@ const WorkflowView = ({}: any) => {
207205
<Modal
208206
title={
209207
<>
210-
Agent Specification{" "}
208+
Workflow Specification{" "}
211209
<span className="text-accent font-normal">
212210
{localWorkflow?.name}
213211
</span>{" "}
@@ -223,7 +221,7 @@ const WorkflowView = ({}: any) => {
223221
}}
224222
onCancel={() => {
225223
setShowWorkflowModal(false);
226-
setWorkflow(null);
224+
setWorkflow?.(null);
227225
}}
228226
>
229227
{localWorkflow && (
@@ -251,7 +249,6 @@ const WorkflowView = ({}: any) => {
251249

252250
<WorkflowModal
253251
workflow={newWorkflow}
254-
setWorkflow={setNewWorkflow}
255252
showWorkflowModal={showNewWorkflowModal}
256253
setShowWorkflowModal={setShowNewWorkflowModal}
257254
handler={(workflow: IFlowConfig) => {

0 commit comments

Comments
 (0)