Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

fixed redirect to new prompt project after created (#275)

jagadeeswaran-zipstack4a62eb811eda
diff --git a/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx b/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx
index 84a70f7e8..12401fd17 100644
--- a/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx
+++ b/frontend/src/components/custom-tools/add-custom-tool-form-modal/AddCustomToolFormModal.jsx
@@ -7,6 +7,7 @@ import { getBackendErrorDetail } from "../../../helpers/GetStaticData";
import { useAlertStore } from "../../../store/alert-store";
import "./AddCustomToolFormModal.css";
import { useExceptionHandler } from "../../../hooks/useExceptionHandler";
+import { useNavigate } from "react-router-dom";
const defaultFromDetails = {
tool_name: "",
author: "",
@@ -31,6 +32,7 @@ function AddCustomToolFormModal({
);
const [icon, setIcon] = useState(isEdit ? formDetails.icon : "");
const [backendErrors, setBackendErrors] = useState(null);
+ const navigate = useNavigate();
const updateIcon = (emoji) => {
setIcon(emoji);
@@ -71,6 +73,7 @@ function AddCustomToolFormModal({
});
setOpen(false);
clearFormDetails();
+ navigate(success?.tool_id);
})
.catch((err) => {
handleException(err, "", setBackendErrors);
diff --git a/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx b/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx
index 703f6ebb6..37ba29d38 100644
--- a/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx
+++ b/frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx
@@ -88,7 +88,7 @@ function ListOfTools() {
const tool = res?.data;
updateList(isEdit, tool);
setOpenAddTool(false);
- resolve(true);
+ resolve(res?.data);
})
.catch((err) => {
reject(err);