@ichaingo/header 1.5.17 → 1.5.18
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/dist/lib/Explorer.js +16 -23
- package/package.json +14 -14
package/dist/lib/Explorer.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import p from "@ichaingo/translation";
|
|
4
4
|
import { Dropdown as h } from "antd";
|
|
5
|
-
import { useState as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { useState as f, useEffect as d } from "react";
|
|
6
|
+
import m from "@ichaingo/request";
|
|
7
|
+
import u from "@ichaingo/link";
|
|
8
8
|
import g from "@ichaingo/better-link";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import w from "@ichaingo/image";
|
|
10
|
+
function I() {
|
|
11
|
+
const { gotoExplorer: n } = g(), [t, s] = f([]), c = async () => {
|
|
12
|
+
const r = await m.get("/api/v2/chains/all-chain-list/basic");
|
|
12
13
|
s(r.data);
|
|
13
14
|
};
|
|
14
15
|
d(() => {
|
|
15
|
-
|
|
16
|
+
c();
|
|
16
17
|
}, []);
|
|
17
18
|
const l = (r) => {
|
|
18
|
-
var
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ o(
|
|
21
|
-
"i",
|
|
22
|
-
{
|
|
23
|
-
className: "block w-5 h-5 bg-cover bg-center",
|
|
24
|
-
style: {
|
|
25
|
-
backgroundImage: r != null && r.chainIconUrl ? `url(${r == null ? void 0 : r.chainIconUrl})` : `url('//cdn.ichaingo.com/module/cryptos/${(a = (e = r == null ? void 0 : r.chain) == null ? void 0 : e.toLowerCase()) == null ? void 0 : a.replace(" ", "-")}.png?format=auto&width=20&height=20')`
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
),
|
|
19
|
+
var a, e;
|
|
20
|
+
return /* @__PURE__ */ i(u, { href: n({ chain: r.chainSymbol }), className: "w-full h-full flex items-center gap-2 py-2 cursor-pointer font-medium", baseUrl: process.env.NEXT_PUBLIC_BASE_URL, children: [
|
|
21
|
+
/* @__PURE__ */ o(w, { src: r != null && r.chainIconUrl ? r == null ? void 0 : r.chainIconUrl : `//cdn.ichaingo.com/module/cryptos/${(e = (a = r == null ? void 0 : r.chain) == null ? void 0 : a.toLowerCase()) == null ? void 0 : e.replace(" ", "-")}.png?format=auto&width=20&height=20`, className: "w-5 h-5", objectFit: "contain" }),
|
|
29
22
|
/* @__PURE__ */ o("div", { className: "flex-1", children: r == null ? void 0 : r.chainSymbol })
|
|
30
23
|
] });
|
|
31
24
|
};
|
|
@@ -39,15 +32,15 @@ function k() {
|
|
|
39
32
|
arrow: { pointAtCenter: !0 },
|
|
40
33
|
placement: "bottom",
|
|
41
34
|
menu: {
|
|
42
|
-
items:
|
|
35
|
+
items: t.map((r) => ({
|
|
43
36
|
label: l(r),
|
|
44
37
|
key: r.chainSymbol
|
|
45
38
|
}))
|
|
46
39
|
},
|
|
47
|
-
children: /* @__PURE__ */ o("div", { className: "whitespace-nowrap leading-11 md:leading-[34px] flex items-center gap-1", children: /* @__PURE__ */ o(
|
|
40
|
+
children: /* @__PURE__ */ o("div", { className: "whitespace-nowrap leading-11 md:leading-[34px] flex items-center gap-1", children: /* @__PURE__ */ o(p, { value: "title", parentKey: "browser" }) })
|
|
48
41
|
}
|
|
49
42
|
);
|
|
50
43
|
}
|
|
51
44
|
export {
|
|
52
|
-
|
|
45
|
+
I as default
|
|
53
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichaingo/header",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"tailwind-merge": "3.3.1",
|
|
33
33
|
"next": "15.5.6",
|
|
34
34
|
"antd": "6.1.1",
|
|
35
|
-
"@ichaingo/
|
|
36
|
-
"@ichaingo/
|
|
37
|
-
"@ichaingo/
|
|
38
|
-
"@ichaingo/ui": "1.5.
|
|
39
|
-
"@ichaingo/
|
|
40
|
-
"@ichaingo/
|
|
41
|
-
"@ichaingo/
|
|
42
|
-
"@ichaingo/
|
|
43
|
-
"@ichaingo/
|
|
44
|
-
"@ichaingo/
|
|
45
|
-
"@ichaingo/
|
|
46
|
-
"@ichaingo/with-login": "1.5.
|
|
47
|
-
"@ichaingo/token": "1.5.
|
|
35
|
+
"@ichaingo/image": "1.5.18",
|
|
36
|
+
"@ichaingo/better-link": "1.5.18",
|
|
37
|
+
"@ichaingo/translation": "1.5.18",
|
|
38
|
+
"@ichaingo/ui": "1.5.18",
|
|
39
|
+
"@ichaingo/avatar": "1.5.18",
|
|
40
|
+
"@ichaingo/iconfont": "1.5.18",
|
|
41
|
+
"@ichaingo/request": "1.5.18",
|
|
42
|
+
"@ichaingo/link": "1.5.18",
|
|
43
|
+
"@ichaingo/auth": "1.5.18",
|
|
44
|
+
"@ichaingo/theme-toggle": "1.5.18",
|
|
45
|
+
"@ichaingo/tooltip": "1.5.18",
|
|
46
|
+
"@ichaingo/with-login": "1.5.18",
|
|
47
|
+
"@ichaingo/token": "1.5.18"
|
|
48
48
|
}
|
|
49
49
|
}
|