@blocklet/ui-react 2.13.46 → 2.13.47
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/lib/Footer/links.d.ts +0 -1
- package/lib/Footer/links.js +1 -1
- package/package.json +4 -4
- package/src/Footer/links.jsx +4 -2
package/lib/Footer/links.d.ts
CHANGED
package/lib/Footer/links.js
CHANGED
|
@@ -19,7 +19,7 @@ export default function Links({ links, flowLayout, columns, ...rest }) {
|
|
|
19
19
|
let result = label;
|
|
20
20
|
if (render) {
|
|
21
21
|
result = render({ label, link, props });
|
|
22
|
-
} else if (isString(link)) {
|
|
22
|
+
} else if (link && isString(link)) {
|
|
23
23
|
const isExternal = link.startsWith("http") || link.startsWith("//");
|
|
24
24
|
result = /* @__PURE__ */ jsx(
|
|
25
25
|
"a",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.47",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@abtnode/constant": "^1.16.43",
|
|
36
36
|
"@abtnode/util": "^1.16.43",
|
|
37
|
-
"@arcblock/bridge": "^2.13.
|
|
38
|
-
"@arcblock/react-hooks": "^2.13.
|
|
37
|
+
"@arcblock/bridge": "^2.13.47",
|
|
38
|
+
"@arcblock/react-hooks": "^2.13.47",
|
|
39
39
|
"@arcblock/ws": "^1.20.11",
|
|
40
40
|
"@blocklet/constant": "^1.16.43",
|
|
41
41
|
"@blocklet/did-space-react": "^1.0.54",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"jest": "^29.7.0",
|
|
95
95
|
"unbuild": "^2.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "8236383669dc761248ad704198602e3b5af3bed2"
|
|
98
98
|
}
|
package/src/Footer/links.jsx
CHANGED
|
@@ -13,7 +13,6 @@ import { splitNavColumns } from '../utils';
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* footer 中的 links (支持分组, 最多支持 2 级)
|
|
16
|
-
* TODO: dark/light theme
|
|
17
16
|
*/
|
|
18
17
|
export default function Links({ links, flowLayout, columns, ...rest }) {
|
|
19
18
|
const [activeIndex, setActiveIndex] = useState(-1);
|
|
@@ -24,10 +23,12 @@ export default function Links({ links, flowLayout, columns, ...rest }) {
|
|
|
24
23
|
const columnsLayout = !isMobile && isGroupMode && isInteger(columns) && columns > 1;
|
|
25
24
|
const renderItem = ({ label, link, icon, render, props }) => {
|
|
26
25
|
let result = label;
|
|
26
|
+
|
|
27
27
|
if (render) {
|
|
28
28
|
result = render({ label, link, props });
|
|
29
|
-
} else if (isString(link)) {
|
|
29
|
+
} else if (link && isString(link)) {
|
|
30
30
|
const isExternal = link.startsWith('http') || link.startsWith('//');
|
|
31
|
+
|
|
31
32
|
result = (
|
|
32
33
|
<a
|
|
33
34
|
href={link}
|
|
@@ -39,6 +40,7 @@ export default function Links({ links, flowLayout, columns, ...rest }) {
|
|
|
39
40
|
</a>
|
|
40
41
|
);
|
|
41
42
|
}
|
|
43
|
+
|
|
42
44
|
return (
|
|
43
45
|
<>
|
|
44
46
|
{icon && <Icon icon={icon} size={20} sx={{ mr: 0.5 }} />}
|