Skip to content

Commit

Permalink
revert: code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
shhdgit committed Jan 15, 2024
1 parent 2ca8aae commit 96759ed
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ const WorkflowView = ({}: any) => {
React.useState<IFlowConfig | null>(null);

const defaultConfig = sampleWorkflowConfig();
const [newWorkflow, setNewWorkflow] = React.useState<IFlowConfig | null>(
defaultConfig
);
const [newWorkflow] = React.useState<IFlowConfig | null>(defaultConfig);

const [showWorkflowModal, setShowWorkflowModal] = React.useState(false);
const [showNewWorkflowModal, setShowNewWorkflowModal] = React.useState(false);
Expand Down Expand Up @@ -195,7 +193,7 @@ const WorkflowView = ({}: any) => {
handler,
}: {
workflow: IFlowConfig | null;
setWorkflow: (workflow: IFlowConfig | null) => void;
setWorkflow?: (workflow: IFlowConfig | null) => void;
showWorkflowModal: boolean;
setShowWorkflowModal: (show: boolean) => void;
handler?: (workflow: IFlowConfig) => void;
Expand All @@ -207,7 +205,7 @@ const WorkflowView = ({}: any) => {
<Modal
title={
<>
Agent Specification{" "}
Workflow Specification{" "}
<span className="text-accent font-normal">
{localWorkflow?.name}
</span>{" "}
Expand All @@ -223,7 +221,7 @@ const WorkflowView = ({}: any) => {
}}
onCancel={() => {
setShowWorkflowModal(false);
setWorkflow(null);
setWorkflow?.(null);
}}
>
{localWorkflow && (
Expand Down Expand Up @@ -251,7 +249,6 @@ const WorkflowView = ({}: any) => {

<WorkflowModal
workflow={newWorkflow}
setWorkflow={setNewWorkflow}
showWorkflowModal={showNewWorkflowModal}
setShowWorkflowModal={setShowNewWorkflowModal}
handler={(workflow: IFlowConfig) => {
Expand Down

0 comments on commit 96759ed

Please sign in to comment.