react-ecosistema-unp 0.9.10 → 0.9.11-pre-release

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.
@@ -1,9 +1,9 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { useAuthId as d } from "../../auth/hooks/AuthHook.js";
3
3
  import { j as p } from "../../index-CuHybtft.js";
4
- import { u as f, N as r, O as h } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
5
- const T = () => {
6
- const { authToken: c, userToken: n } = d(), i = f(), a = n || localStorage.getItem("user_token");
4
+ import { u as h, N as r, B as f, O as g } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
5
+ const _ = () => {
6
+ const { authToken: c, userToken: n } = d(), i = h(), a = n || localStorage.getItem("user_token");
7
7
  if (!(c || localStorage.getItem("access_token")) || !a)
8
8
  return /* @__PURE__ */ e(r, { to: "/", replace: !0 });
9
9
  let s;
@@ -15,8 +15,8 @@ const T = () => {
15
15
  const u = s.access_url, o = i.pathname, l = u.map(
16
16
  (t) => t.startsWith("/") ? t : `/${t}`
17
17
  ), m = o.startsWith("/") ? o : `/${o}`;
18
- return l.includes(m) ? /* @__PURE__ */ e(h, {}) : /* @__PURE__ */ e(r, { to: "/sistema/pagina-no-permitida", replace: !0 });
18
+ return l.includes(m) ? /* @__PURE__ */ e(g, {}) : /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(r, { to: "/sistema/pagina-no-permitida", replace: !0 }) });
19
19
  };
20
20
  export {
21
- T as ProtectedRoute
21
+ _ as ProtectedRoute
22
22
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useAuthId as a } from "../../auth/hooks/AuthHook.js";
3
- import { N as s, O as n } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
3
+ import { B as s, N as n, O as u } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
4
4
  const p = () => {
5
5
  const { authToken: e, userToken: o } = a(), r = o || localStorage.getItem("user_token");
6
- return !(e || localStorage.getItem("access_token")) || !r ? /* @__PURE__ */ t(s, { to: "/sistema/pagina-no-permitida", replace: !0 }) : /* @__PURE__ */ t(n, {});
6
+ return !(e || localStorage.getItem("access_token")) || !r ? /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(n, { to: "/sistema/pagina-no-permitida", replace: !0 }) }) : /* @__PURE__ */ t(u, {});
7
7
  };
8
8
  export {
9
9
  p as UserRoute
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-ecosistema-unp",
3
3
  "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
4
  "private": false,
5
- "version": "0.9.10",
5
+ "version": "0.9.11-pre-release",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {