@ludo.ninja/components 2.2.58 → 2.2.59

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.
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HOCAuthSearchParamsLocalhostInterceptor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const env_1 = require("../../../store/env");
6
5
  const api_1 = require("@ludo.ninja/api");
7
6
  const router_1 = require("next/router");
8
7
  const react_1 = require("react");
9
- const AuthLoginLocalhost = () => {
8
+ const AuthLoginQuery = () => {
10
9
  (0, react_1.useEffect)(() => {
11
10
  const currentUrl = new URL(window.location.href);
12
11
  const userId = currentUrl.searchParams.get("userId");
@@ -27,9 +26,8 @@ const AuthLoginLocalhost = () => {
27
26
  };
28
27
  const HOCAuthSearchParamsLocalhostInterceptor = (Component, pageProps) => {
29
28
  const router = (0, router_1.useRouter)();
30
- const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
31
- if (!pageProps.userData && router.query?.authToken && NEXT_PUBLIC_ENV_VALUE === "development") {
32
- return (0, jsx_runtime_1.jsx)(AuthLoginLocalhost, {});
29
+ if (!pageProps.userData && router.query?.authToken) {
30
+ return (0, jsx_runtime_1.jsx)(AuthLoginQuery, {});
33
31
  }
34
32
  return Component;
35
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.2.58",
3
+ "version": "2.2.59",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",