@ludo.ninja/components 2.2.0 → 2.2.2

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,7 +1,7 @@
1
1
  import { identitySchema as schema } from "@ludo.ninja/api";
2
2
  declare const useFetchUserWallets: ({ userId }: schema.IQueryFetchUserWalletsArgs) => {
3
3
  refetch: (variables?: Partial<schema.Exact<{
4
- userId: string;
4
+ userId: schema.Scalars["ID"];
5
5
  }>> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<schema.IFetchUserWalletsQuery>>;
6
6
  loading: boolean;
7
7
  error: import("@apollo/client").ApolloError | undefined;
@@ -4,7 +4,7 @@ declare const useFetchUserpic: () => {
4
4
  loading: boolean;
5
5
  error: import("@apollo/client").ApolloError | undefined;
6
6
  refetch: (variables?: Partial<schema.Exact<{
7
- userId: string;
7
+ userId: schema.Scalars["ID"];
8
8
  }>> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<schema.IFetchUserpicQuery>>;
9
9
  load: (userId: string) => void;
10
10
  userPic: string | null;
@@ -12,8 +12,8 @@ export declare const useFetchFindAllTopEntitiesByName: () => {
12
12
  loading: boolean;
13
13
  error: import("@apollo/client").ApolloError | undefined;
14
14
  load: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFindAllTopEntitiesByNameQuery, searchSchema.Exact<{
15
- name: string;
16
- pageSize: number;
15
+ name: searchSchema.Scalars["String"];
16
+ pageSize: searchSchema.Scalars["Int"];
17
17
  }>>>;
18
18
  topEntities: {
19
19
  assets: AssetEntity[];
@@ -28,8 +28,8 @@ declare const _default: {
28
28
  loading: boolean;
29
29
  error: import("@apollo/client").ApolloError | undefined;
30
30
  load: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFindAllTopEntitiesByNameQuery, searchSchema.Exact<{
31
- name: string;
32
- pageSize: number;
31
+ name: searchSchema.Scalars["String"];
32
+ pageSize: searchSchema.Scalars["Int"];
33
33
  }>>>;
34
34
  topEntities: {
35
35
  assets: AssetEntity[];
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.useSignOut = void 0;
7
- const nookies_1 = require("nookies");
8
- const api_1 = require("@ludo.ninja/api");
9
- const env_1 = require("../../../store/env");
10
- const useRevokeToken_1 = __importDefault(require("../../../api/server-identities/mutations/useRevokeToken"));
11
7
  const store_1 = require("../store");
12
- const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
8
+ const useRevokeToken_1 = __importDefault(require("../../../api/server-identities/mutations/useRevokeToken"));
9
+ const env_1 = require("../../../store/env");
10
+ const api_1 = require("@ludo.ninja/api");
11
+ const nookies_1 = require("nookies");
12
+ // import { ludoDomains, TEnvValue } from "@ludo.ninja/core/build/ludoDomains";
13
13
  const useSignOut = () => {
14
- const { NEXT_PUBLIC_ENV_VALUE, NEXT_PUBLIC_ENV_DOMAIN } = (0, env_1.useEnvStore)((state) => ({
14
+ const { /*NEXT_PUBLIC_ENV_VALUE,*/ NEXT_PUBLIC_ENV_DOMAIN } = (0, env_1.useEnvStore)((state) => ({
15
15
  NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
16
16
  NEXT_PUBLIC_ENV_DOMAIN: state.NEXT_PUBLIC_ENV_DOMAIN,
17
17
  }));
@@ -26,12 +26,13 @@ const useSignOut = () => {
26
26
  }
27
27
  finally {
28
28
  api_1.authCookies.destroyCookies(NEXT_PUBLIC_ENV_DOMAIN);
29
- (0, nookies_1.destroyCookie)(null, 'authMultiversXWallet', {
30
- path: '/',
29
+ (0, nookies_1.destroyCookie)(null, "authMultiversXWallet", {
30
+ path: "/",
31
31
  domain: NEXT_PUBLIC_ENV_DOMAIN,
32
32
  });
33
33
  setUser(null);
34
- window.location.replace(ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]);
34
+ // when invite code is not required = no redirect
35
+ // window.location.replace(ludoDomains[NEXT_PUBLIC_ENV_VALUE as TEnvValue]["welcome"]);
35
36
  }
36
37
  };
37
38
  };
@@ -40,8 +40,7 @@ const useVerification = () => {
40
40
  authCookiesParsed.refreshToken &&
41
41
  authCookiesParsed.newUser &&
42
42
  authCookiesParsed.userId &&
43
- //todo: remove required invite code
44
- authCookiesParsed.inviteCode &&
43
+ // authCookiesParsed.inviteCode &&
45
44
  authCookiesParsed.role) {
46
45
  signIn({
47
46
  userId: authCookiesParsed.userId,
@@ -54,7 +53,7 @@ const useVerification = () => {
54
53
  });
55
54
  }
56
55
  else {
57
- //todo: remove required invite code
56
+ // when invite code is not required = no redirect in sign out
58
57
  if (isProd() && currentLocation !== "/forms/[formId]" && currentLocation !== "/minting") {
59
58
  await signOut();
60
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",