feat: fetch workflow
This commit is contained in:
@@ -20,6 +20,17 @@ import Radio from '@mui/material/Radio';
|
|||||||
import RadioGroup from '@mui/material/RadioGroup';
|
import RadioGroup from '@mui/material/RadioGroup';
|
||||||
import { emptyWorkflow } from "../../shared/constants";
|
import { emptyWorkflow } from "../../shared/constants";
|
||||||
|
|
||||||
|
const fetchWorkflow = (id: string, callback: (response: WorkflowFile) => void) => {
|
||||||
|
getActiveWorkflow(id).then(
|
||||||
|
(response) => {
|
||||||
|
if (response) {
|
||||||
|
callback(response);
|
||||||
|
} else {
|
||||||
|
throw new Error("No workflow found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
).catch((error) => { console.log(error.message) })
|
||||||
|
};
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// 1. Add description for each browser step
|
// 1. Add description for each browser step
|
||||||
|
|||||||
Reference in New Issue
Block a user