@ludo.ninja/components 2.3.37 → 2.3.39

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.
@@ -17,7 +17,7 @@ const useFetchMyActivityStreak = () => {
17
17
  const { openAlert } = (0, ui_1.useUiStore)((state) => ({
18
18
  openAlert: state.openAlert
19
19
  }));
20
- const [fetchActivityStreak] = (0, schema_1.useFetchMyActivityStreakLazyQuery)({
20
+ const [fetchActivityStreak, { loading }] = (0, schema_1.useFetchMyActivityStreakLazyQuery)({
21
21
  context: {
22
22
  uri: api_1.hosts.experiencesHost,
23
23
  },
@@ -45,7 +45,7 @@ const useFetchMyActivityStreak = () => {
45
45
  (0, react_1.useEffect)(() => {
46
46
  if (isSignedIn) {
47
47
  setIsLoadingStreak(true);
48
- fetchActivityStreak();
48
+ fetchActivityStreak().finally(() => setIsLoadingStreak(false));
49
49
  }
50
50
  }, [isSignedIn]);
51
51
  };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface AddWalletProps {
3
+ children: React.ReactNode;
4
+ loginBtnText?: string;
5
+ }
6
+ declare const AddWalletsLoginBtns: React.FC<AddWalletProps>;
7
+ export default AddWalletsLoginBtns;
@@ -0,0 +1,17 @@
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 store_1 = require("../../modules/user/store");
8
+ const MainButton_1 = __importDefault(require("../../system/Buttons/MainButton"));
9
+ const auth_1 = require("../../utils/auth");
10
+ const AddWalletsLoginBtns = ({ children, loginBtnText = 'Join Ludo', }) => {
11
+ const redirectToLoginWindow = (0, auth_1.useRedirectToLoginWindow)();
12
+ const isSignedIn = (0, store_1.useUserStore)((state) => state.isSignedIn);
13
+ if (!isSignedIn)
14
+ return ((0, jsx_runtime_1.jsx)(MainButton_1.default, { onClick: () => redirectToLoginWindow(), variant: "primaryM", text: loginBtnText }));
15
+ return children;
16
+ };
17
+ exports.default = AddWalletsLoginBtns;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.3.37",
3
+ "version": "2.3.39",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",