Skip to content

Commit

Permalink
refactor: hoist up static variable out of component
Browse files Browse the repository at this point in the history
Signed-off-by: tetora1053 <[email protected]>
  • Loading branch information
tetora1053 committed Sep 14, 2023
1 parent 9050132 commit e370c67
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ui/src/app/workflows/components/submit-workflow-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ interface Props {
}

const workflowEntrypoint = '<default>';
const defaultTemplate: Template = {
name: workflowEntrypoint,
inputs: {
parameters: []
}
};

export function SubmitWorkflowPanel(props: Props) {
const defaultTemplate: Template = {
name: workflowEntrypoint,
inputs: {
parameters: []
}
};

const [entrypoint, setEntrypoint] = useState(workflowEntrypoint);
const [parameters, setParameters] = useState<Parameter[]>([]);
const [workflowParameters, setWorkflowParameters] = useState<Parameter[]>(JSON.parse(JSON.stringify(props.workflowParameters)));
Expand Down

0 comments on commit e370c67

Please sign in to comment.