@hexdspace/react 0.0.21 → 0.0.22

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -925,7 +925,7 @@ function RequireAuth({
925
925
  return /* @__PURE__ */ jsx6(Fragment, { children: loadingPlaceholder ?? null });
926
926
  }
927
927
  if (auth.status === "error") {
928
- return /* @__PURE__ */ jsx6(Fragment, { children: errorPlaceholder ?? loadingPlaceholder ?? null });
928
+ return /* @__PURE__ */ jsx6(Fragment, { children: errorPlaceholder ?? unauthenticatedPlaceholder ?? loadingPlaceholder ?? null });
929
929
  }
930
930
  if (auth.status === "unauthenticated") {
931
931
  if (unauthenticatedRedirectTo) {
@@ -947,13 +947,16 @@ function RedirectIfAuthed({
947
947
  return /* @__PURE__ */ jsx6(Fragment, { children: loadingPlaceholder ?? null });
948
948
  }
949
949
  if (auth.status === "error") {
950
- return /* @__PURE__ */ jsx6(Fragment, { children: errorPlaceholder ?? loadingPlaceholder ?? null });
950
+ return /* @__PURE__ */ jsx6(Fragment, { children: errorPlaceholder ?? nonAuthedPlaceholder ?? loadingPlaceholder ?? null });
951
951
  }
952
952
  if (auth.status === "authenticated") {
953
953
  if (redirectTo) {
954
954
  return /* @__PURE__ */ jsx6(Navigate, { to: redirectTo, replace: true });
955
955
  }
956
- return /* @__PURE__ */ jsx6(Fragment, { children: authenticatedPlaceholder ?? null });
956
+ if (authenticatedPlaceholder) {
957
+ return /* @__PURE__ */ jsx6(Fragment, { children: authenticatedPlaceholder });
958
+ }
959
+ return /* @__PURE__ */ jsx6(Outlet, {});
957
960
  }
958
961
  return nonAuthedPlaceholder ? /* @__PURE__ */ jsx6(Fragment, { children: nonAuthedPlaceholder }) : /* @__PURE__ */ jsx6(Outlet, {});
959
962
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexdspace/react",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",