@blocklet/launcher-workflow 2.3.106 → 2.3.107

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.
package/es/prepare.js CHANGED
@@ -14,7 +14,7 @@ import Stack from '@mui/material/Stack';
14
14
  import ToggleButton from '@mui/material/ToggleButton';
15
15
  import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
16
16
  import PropTypes from 'prop-types';
17
- import { useCallback, useEffect, useMemo } from 'react';
17
+ import { useCallback, useEffect, useMemo, useRef } from 'react';
18
18
  import { Link, useNavigate, useSearchParams } from 'react-router-dom';
19
19
  import useAsync from 'react-use/lib/useAsync';
20
20
  import useSetState from 'react-use/lib/useSetState';
@@ -64,6 +64,7 @@ function Content({
64
64
  isMobile
65
65
  } = useMobile();
66
66
  const navigate = useNavigate();
67
+ const launchLoaded = useRef(false);
67
68
  const sessionId = params.get('sessionId');
68
69
  const blockletMetaUrl = getBlockletMetaUrlFromQuery(params);
69
70
  const defaultProductTypeName = params.get('product_type');
@@ -163,7 +164,8 @@ function Content({
163
164
  });
164
165
  }
165
166
  }, [launchState.value?.launch, params, setParams]);
166
- if (blocklet.loading) {
167
+ if (!launchLoaded.current && launchState.loading || blocklet.loading) {
168
+ launchLoaded.current = true;
167
169
  return /*#__PURE__*/_jsx(Center, {
168
170
  relative: "parent",
169
171
  children: /*#__PURE__*/_jsx(CircularProgress, {})
package/lib/prepare.js CHANGED
@@ -67,6 +67,7 @@ function Content(_ref) {
67
67
  isMobile
68
68
  } = (0, _useMobile.default)();
69
69
  const navigate = (0, _reactRouterDom.useNavigate)();
70
+ const launchLoaded = (0, _react.useRef)(false);
70
71
  const sessionId = params.get('sessionId');
71
72
  const blockletMetaUrl = (0, _util.getBlockletMetaUrlFromQuery)(params);
72
73
  const defaultProductTypeName = params.get('product_type');
@@ -175,7 +176,8 @@ function Content(_ref) {
175
176
  });
176
177
  }
177
178
  }, [(_launchState$value5 = launchState.value) === null || _launchState$value5 === void 0 ? void 0 : _launchState$value5.launch, params, setParams]);
178
- if (blocklet.loading) {
179
+ if (!launchLoaded.current && launchState.loading || blocklet.loading) {
180
+ launchLoaded.current = true;
179
181
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Center.default, {
180
182
  relative: "parent",
181
183
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "2.3.106",
3
+ "version": "2.3.107",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -41,16 +41,16 @@
41
41
  "react": ">=18.1.0"
42
42
  },
43
43
  "dependencies": {
44
- "@arcblock/did-connect": "^2.12.52",
45
- "@arcblock/icons": "^2.12.52",
46
- "@arcblock/license": "^2.12.52",
47
- "@arcblock/react-hooks": "^2.12.52",
48
- "@arcblock/ux": "^2.12.52",
49
- "@blocklet/launcher-layout": "^2.12.52",
50
- "@blocklet/launcher-util": "2.3.106",
51
- "@blocklet/launcher-ux": "2.3.106",
44
+ "@arcblock/did-connect": "^2.12.55",
45
+ "@arcblock/icons": "^2.12.55",
46
+ "@arcblock/license": "^2.12.55",
47
+ "@arcblock/react-hooks": "^2.12.55",
48
+ "@arcblock/ux": "^2.12.55",
49
+ "@blocklet/launcher-layout": "^2.12.55",
50
+ "@blocklet/launcher-util": "2.3.107",
51
+ "@blocklet/launcher-ux": "2.3.107",
52
52
  "@blocklet/payment": "^1.14.8",
53
- "@blocklet/payment-react": "^1.18.24",
53
+ "@blocklet/payment-react": "^1.18.25",
54
54
  "@emotion/react": "^11.14.0",
55
55
  "@emotion/styled": "^11.14.0",
56
56
  "@mui/icons-material": "^5.17.1",
@@ -106,5 +106,5 @@
106
106
  "require": "./lib/locales/index.js"
107
107
  }
108
108
  },
109
- "gitHead": "5810708b2b24f2a0271b6b0139fc41ea2f902eb0"
109
+ "gitHead": "05d6eed77af33c6be87da3ac4543bc15a31aec04"
110
110
  }