@blocklet/ui-react 2.10.2 → 2.10.3

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.
@@ -370,7 +370,14 @@ export default function UserCenter({
370
370
  ] });
371
371
  }, [userState, userCenterTabs, isMyself, currentActiveTab, privacyState, currentTab, stickySidebar]);
372
372
  if (!disableAutoRedirect && !currentTab && formattedBlocklet?.navigation?.userCenter?.length > 0) {
373
- window.location.replace(formattedBlocklet?.navigation?.userCenter[0]?.link);
373
+ const firstUserCenterUrl = formattedBlocklet?.navigation?.userCenter[0]?.link;
374
+ if (firstUserCenterUrl) {
375
+ window.location.replace(
376
+ withQuery(firstUserCenterUrl, {
377
+ did: isMyself ? void 0 : currentDid
378
+ })
379
+ );
380
+ }
374
381
  return null;
375
382
  }
376
383
  return /* @__PURE__ */ jsxs(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.10.2",
3
+ "version": "2.10.3",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/ArcBlock/ux/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@arcblock/bridge": "^2.10.2",
36
- "@arcblock/react-hooks": "^2.10.2",
35
+ "@arcblock/bridge": "^2.10.3",
36
+ "@arcblock/react-hooks": "^2.10.3",
37
37
  "@iconify-icons/logos": "^1.2.36",
38
38
  "@iconify-icons/material-symbols": "^1.2.58",
39
39
  "@iconify/react": "^4.1.1",
@@ -78,5 +78,5 @@
78
78
  "jest": "^28.1.3",
79
79
  "unbuild": "^2.0.0"
80
80
  },
81
- "gitHead": "01c29cd905a2baf029d7be25d41c79a261ebd959"
81
+ "gitHead": "bd12e5b7417376a7a2be74354a070f04a997efac"
82
82
  }
@@ -402,7 +402,14 @@ export default function UserCenter({
402
402
  }, [userState, userCenterTabs, isMyself, currentActiveTab, privacyState, currentTab, stickySidebar]);
403
403
 
404
404
  if (!disableAutoRedirect && !currentTab && formattedBlocklet?.navigation?.userCenter?.length > 0) {
405
- window.location.replace(formattedBlocklet?.navigation?.userCenter[0]?.link);
405
+ const firstUserCenterUrl = formattedBlocklet?.navigation?.userCenter[0]?.link;
406
+ if (firstUserCenterUrl) {
407
+ window.location.replace(
408
+ withQuery(firstUserCenterUrl, {
409
+ did: isMyself ? undefined : currentDid,
410
+ })
411
+ );
412
+ }
406
413
  return null;
407
414
  }
408
415