diff --git a/src/components/CreateCompany/CreateCompany.tsx b/src/components/CreateCompany/CreateCompany.tsx index af01dcd..26aae87 100644 --- a/src/components/CreateCompany/CreateCompany.tsx +++ b/src/components/CreateCompany/CreateCompany.tsx @@ -45,7 +45,7 @@ const CreateCompany: React.FC = ({ setServerError(""); // console.log(JSON.stringify(data)); await saveCompany(data) - router.push("/settings/company"); + router.replace("/settings/company"); } catch (e) { setServerError(t("An error has occurred. Please try again later.")); } diff --git a/src/components/CreateDepartment/CreateDepartment.tsx b/src/components/CreateDepartment/CreateDepartment.tsx index 8e8e253..2d95d28 100644 --- a/src/components/CreateDepartment/CreateDepartment.tsx +++ b/src/components/CreateDepartment/CreateDepartment.tsx @@ -50,7 +50,7 @@ const CreateDepartment: React.FC = ({ setServerError(""); // console.log(JSON.stringify(data)); await saveDepartment(data) - router.push("/settings/department"); + router.replace("/settings/department"); } catch (e) { setServerError(t("An error has occurred. Please try again later.")); } diff --git a/src/components/CreatePosition/CreatePosition.tsx b/src/components/CreatePosition/CreatePosition.tsx index c1820eb..0edfe0a 100644 --- a/src/components/CreatePosition/CreatePosition.tsx +++ b/src/components/CreatePosition/CreatePosition.tsx @@ -45,7 +45,7 @@ const CreatePosition: React.FC = ({ setServerError(""); // console.log(JSON.stringify(data)); await savePosition(data) - router.push("/settings/position"); + router.replace("/settings/position"); } catch (e) { setServerError(t("An error has occurred. Please try again later.")); }