diff --git a/src/frontend/src/modals/flowLogsModal/index.tsx b/src/frontend/src/modals/flowLogsModal/index.tsx index f914f529a..d7c9625b7 100644 --- a/src/frontend/src/modals/flowLogsModal/index.tsx +++ b/src/frontend/src/modals/flowLogsModal/index.tsx @@ -16,41 +16,15 @@ export default function FlowLogsModal({ open, setOpen, }: FlowSettingsPropsType): JSX.Element { - const saveFlow = useFlowsManagerStore((state) => state.saveFlow); const nodes = useFlowStore((state) => state.nodes); - const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId); - const flows = useFlowsManagerStore((state) => state.flows); const setNoticeData = useAlertStore((state) => state.setNoticeData); - useEffect(() => { - setName(currentFlow!.name); - setDescription(currentFlow!.description); - }, [currentFlow!.name, currentFlow!.description, open]); - - const [name, setName] = useState(currentFlow!.name); - const [description, setDescription] = useState(currentFlow!.description); const [columns, setColumns] = useState>([]); const [rows, setRows] = useState([]); const [activeTab, setActiveTab] = useState("Executions"); const noticed = useRef(false); - function handleClick(): void { - currentFlow!.name = name; - currentFlow!.description = description; - saveFlow(currentFlow!) - ?.then(() => { - setOpen(false); - }) - .catch((err) => { - useAlertStore.getState().setErrorData({ - title: "Error while saving changes", - list: [(err as AxiosError).response?.data.detail ?? ""], - }); - console.error(err); - }); - } - useEffect(() => { if (activeTab === "Executions") { getTransactionTable(currentFlowId, "union").then((data) => { @@ -86,16 +60,6 @@ export default function FlowLogsModal({ } }, [open, activeTab]); - const [nameLists, setNameList] = useState([]); - - useEffect(() => { - const tempNameList: string[] = []; - flows.forEach((flow: FlowType) => { - if ((flow.is_component ?? false) === false) tempNameList.push(flow.name); - }); - setNameList(tempNameList.filter((name) => name !== currentFlow!.name)); - }, [flows]); - return (