@ludo.ninja/components 2.1.79 → 2.1.82

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: schema.Scalars["ID"];
4
+ userId: string;
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: schema.Scalars["ID"];
7
+ userId: string;
8
8
  }>> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<schema.IFetchUserpicQuery>>;
9
9
  load: (userId: string) => void;
10
10
  userPic: string | null;
@@ -1,44 +1,44 @@
1
1
  import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
2
- import { searchSchema as schema } from '@ludo.ninja/api';
2
+ import { searchSchema } from '@ludo.ninja/api';
3
3
  import { ProfileEntity } from '@ludo.ninja/core';
4
4
  import AssetEntity from '../../../../dto/AssetSearchEntity';
5
- export declare const prefetchFindAllTopEntitiesByName: ({ name, pageSize }: schema.IQueryFindAllTopEntitiesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
5
+ export declare const prefetchFindAllTopEntitiesByName: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
6
6
  data: {
7
7
  findAllTopEntitiesByName: null;
8
8
  };
9
9
  }>;
10
10
  export declare const useFetchFindAllTopEntitiesByName: () => {
11
- data: schema.IFindAllTopEntitiesByNameQuery | undefined;
11
+ data: searchSchema.IFindAllTopEntitiesByNameQuery | undefined;
12
12
  loading: boolean;
13
13
  error: import("@apollo/client").ApolloError | undefined;
14
- load: ({ name, pageSize }: schema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<schema.IFindAllTopEntitiesByNameQuery, schema.Exact<{
15
- name: schema.Scalars["String"];
16
- pageSize: schema.Scalars["Int"];
14
+ load: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFindAllTopEntitiesByNameQuery, searchSchema.Exact<{
15
+ name: string;
16
+ pageSize: number;
17
17
  }>>>;
18
18
  topEntities: {
19
19
  assets: AssetEntity[];
20
- collections: schema.ICollection[];
20
+ collections: searchSchema.ICollection[];
21
21
  profiles: ProfileEntity[];
22
22
  } | null;
23
23
  clearTopEntitiesState: () => void;
24
24
  };
25
25
  declare const _default: {
26
26
  useFetchFindAllTopEntitiesByName: () => {
27
- data: schema.IFindAllTopEntitiesByNameQuery | undefined;
27
+ data: searchSchema.IFindAllTopEntitiesByNameQuery | undefined;
28
28
  loading: boolean;
29
29
  error: import("@apollo/client").ApolloError | undefined;
30
- load: ({ name, pageSize }: schema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<schema.IFindAllTopEntitiesByNameQuery, schema.Exact<{
31
- name: schema.Scalars["String"];
32
- pageSize: schema.Scalars["Int"];
30
+ load: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFindAllTopEntitiesByNameQuery, searchSchema.Exact<{
31
+ name: string;
32
+ pageSize: number;
33
33
  }>>>;
34
34
  topEntities: {
35
35
  assets: AssetEntity[];
36
- collections: schema.ICollection[];
36
+ collections: searchSchema.ICollection[];
37
37
  profiles: ProfileEntity[];
38
38
  } | null;
39
39
  clearTopEntitiesState: () => void;
40
40
  };
41
- prefetchFindAllTopEntitiesByName: ({ name, pageSize }: schema.IQueryFindAllTopEntitiesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
41
+ prefetchFindAllTopEntitiesByName: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
42
42
  data: {
43
43
  findAllTopEntitiesByName: null;
44
44
  };
@@ -1,13 +1,13 @@
1
1
  import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
2
- import { searchSchema as schema } from '@ludo.ninja/api';
2
+ import { searchSchema } from '@ludo.ninja/api';
3
3
  import { ProfileEntity } from '@ludo.ninja/core';
4
- export declare const prefetchFindProfilesByName: ({ name, page }: schema.IQueryFindProfilesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
4
+ export declare const prefetchFindProfilesByName: ({ name, page }: searchSchema.IQueryFindProfilesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
5
5
  data: {
6
6
  findProfilesByName: null;
7
7
  };
8
8
  }>;
9
- export declare const useFindProfilesByName: ({ name, page, }: schema.IQueryFindProfilesByNameArgs) => {
10
- data: schema.IFindProfilesByNameQuery | undefined;
9
+ export declare const useFindProfilesByName: ({ name, page, }: searchSchema.IQueryFindProfilesByNameArgs) => {
10
+ data: searchSchema.IFindProfilesByNameQuery | undefined;
11
11
  loading: boolean;
12
12
  error: import("@apollo/client").ApolloError | undefined;
13
13
  clientProfiles: ProfileEntity[] | null;
@@ -15,13 +15,13 @@ export declare const useFindProfilesByName: ({ name, page, }: schema.IQueryFindP
15
15
  clientResults: number;
16
16
  };
17
17
  declare const _default: {
18
- prefetchFindProfilesByName: ({ name, page }: schema.IQueryFindProfilesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
18
+ prefetchFindProfilesByName: ({ name, page }: searchSchema.IQueryFindProfilesByNameArgs, apolloClient: ApolloClient<NormalizedCacheObject>) => Promise<import("@apollo/client").ApolloQueryResult<any> | {
19
19
  data: {
20
20
  findProfilesByName: null;
21
21
  };
22
22
  }>;
23
- useFindProfilesByName: ({ name, page, }: schema.IQueryFindProfilesByNameArgs) => {
24
- data: schema.IFindProfilesByNameQuery | undefined;
23
+ useFindProfilesByName: ({ name, page, }: searchSchema.IQueryFindProfilesByNameArgs) => {
24
+ data: searchSchema.IFindProfilesByNameQuery | undefined;
25
25
  loading: boolean;
26
26
  error: import("@apollo/client").ApolloError | undefined;
27
27
  clientProfiles: ProfileEntity[] | null;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface PageHeadProps {
3
+ title: string;
4
+ description?: string;
5
+ children: React.ReactNode;
6
+ }
7
+ declare const PageHead: React.FC<PageHeadProps>;
8
+ export default PageHead;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const head_1 = __importDefault(require("next/head"));
8
+ // Component
9
+ const PageHead = ({ title, description, children }) => {
10
+ return ((0, jsx_runtime_1.jsxs)(head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: title }), description && (0, jsx_runtime_1.jsx)("meta", { name: "description", content: description }), children] }));
11
+ };
12
+ // Export
13
+ exports.default = PageHead;
@@ -26,9 +26,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.useVerification = void 0;
27
27
  const useSignIn_1 = require("./useSignIn");
28
28
  const useSignOut_1 = require("./useSignOut");
29
+ const env_1 = require("../../../store/env");
29
30
  const useVerification = () => {
30
31
  const signIn = (0, useSignIn_1.useSignIn)();
31
32
  const signOut = (0, useSignOut_1.useSignOut)();
33
+ const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
32
34
  return async (currentLocation) => {
33
35
  try {
34
36
  const authCookies = await Promise.resolve().then(() => __importStar(require("@ludo.ninja/api/build/cookies"))); //update check version cookie in client
@@ -53,7 +55,7 @@ const useVerification = () => {
53
55
  }
54
56
  else {
55
57
  //todo: remove required invite code
56
- if (currentLocation !== "/forms/[formId]" && currentLocation !== "/minting") {
58
+ if (isProd() && currentLocation !== "/forms/[formId]" && currentLocation !== "/minting") {
57
59
  await signOut();
58
60
  }
59
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.1.79",
3
+ "version": "2.1.82",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,6 +23,7 @@
23
23
  "publish": "npm publish --access public -workspace @ludo.ninja/components"
24
24
  },
25
25
  "dependencies": {
26
+ "@ludo.ninja/api": "^2.8.97",
26
27
  "@react-three/drei": "^9.68.3",
27
28
  "@react-three/fiber": "^8.13.0",
28
29
  "chart.js": "^4.4.3",