warqadui 0.0.91 → 0.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8130,8 +8130,7 @@ function Accounts({ v, url }) {
8130
8130
  const navigate = (0, import_react_router_dom6.useNavigate)();
8131
8131
  const { type } = (0, import_react_router_dom6.useParams)();
8132
8132
  if (!enums.accountTypes.includes(type)) {
8133
- import_antd6.message.error("Invalid account type");
8134
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_router_dom6.Navigate, { to: "/accounts", replace: true });
8133
+ navigate(-1);
8135
8134
  }
8136
8135
  const [deleteAccount, setDeleteAccount] = (0, import_react34.useState)(null);
8137
8136
  const { isLoading, remove } = useApis_default();
@@ -8555,8 +8554,7 @@ function AccountForm() {
8555
8554
  const type = getParams("type");
8556
8555
  const isEdit = !!id;
8557
8556
  if (!enums.accountTypes.includes(type)) {
8558
- import_antd7.message.error("Invalid account type");
8559
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_router_dom9.Navigate, { to: "/accounts", replace: true });
8557
+ navigate(-1);
8560
8558
  }
8561
8559
  const { post, put, isLoading } = useApis_default();
8562
8560
  const { isLoading: isLoadingGet, get } = useApis_default();
package/dist/index.mjs CHANGED
@@ -8080,7 +8080,7 @@ var AdminProtectedRoute = () => {
8080
8080
  };
8081
8081
 
8082
8082
  // src/components/accounts/Accounts.tsx
8083
- import { Navigate as Navigate2, useNavigate as useNavigate4, useParams } from "react-router-dom";
8083
+ import { useNavigate as useNavigate4, useParams } from "react-router-dom";
8084
8084
  import { Cable, EllipsisVertical, FilePenLine, Trash2 as Trash22 } from "lucide-react";
8085
8085
  import { useState as useState26 } from "react";
8086
8086
  import { message as message4 } from "antd";
@@ -8091,8 +8091,7 @@ function Accounts({ v, url }) {
8091
8091
  const navigate = useNavigate4();
8092
8092
  const { type } = useParams();
8093
8093
  if (!enums.accountTypes.includes(type)) {
8094
- message4.error("Invalid account type");
8095
- return /* @__PURE__ */ jsx43(Navigate2, { to: "/accounts", replace: true });
8094
+ navigate(-1);
8096
8095
  }
8097
8096
  const [deleteAccount, setDeleteAccount] = useState26(null);
8098
8097
  const { isLoading, remove } = useApis_default();
@@ -8506,7 +8505,7 @@ var AccountFields = {
8506
8505
  var Feilds_default = AccountFields;
8507
8506
 
8508
8507
  // src/components/accounts/AccountForm.tsx
8509
- import { Navigate as Navigate3, useParams as useParams4 } from "react-router-dom";
8508
+ import { useParams as useParams4 } from "react-router-dom";
8510
8509
  import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
8511
8510
  function AccountForm() {
8512
8511
  const { enums } = useWarqadConfig();
@@ -8516,8 +8515,7 @@ function AccountForm() {
8516
8515
  const type = getParams("type");
8517
8516
  const isEdit = !!id;
8518
8517
  if (!enums.accountTypes.includes(type)) {
8519
- message5.error("Invalid account type");
8520
- return /* @__PURE__ */ jsx49(Navigate3, { to: "/accounts", replace: true });
8518
+ navigate(-1);
8521
8519
  }
8522
8520
  const { post, put, isLoading } = useApis_default();
8523
8521
  const { isLoading: isLoadingGet, get } = useApis_default();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warqadui",
3
- "version": "0.0.91",
3
+ "version": "0.0.92",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",