@0xchain/header 1.1.0-beta.45 → 1.1.0-beta.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.
@@ -12,8 +12,13 @@ function Explorer({ onClick = () => void 0, onExpandChange }) {
12
12
  const [list, setList] = useState([]);
13
13
  const [accordionValue, setAccordionValue] = useState("");
14
14
  const getList = async () => {
15
- const res = await request.get("/api/v2/chains/all-chain-list/basic");
16
- setList(res.data);
15
+ try {
16
+ const res = await request.get("/api/v2/chains/all-chain-list/basic");
17
+ setList(Array.isArray(res.data) ? res.data : []);
18
+ } catch (error) {
19
+ console.error(error);
20
+ setList([]);
21
+ }
17
22
  };
18
23
  const handleClick = (e, item) => {
19
24
  e?.preventDefault();
package/dist/lib/Nav.js CHANGED
@@ -23,7 +23,7 @@ function Nav({ onClick = () => void 0, hideNews = false, hideLogin = false, user
23
23
  const pathname = usePathname();
24
24
  const [userKey, setUserKey] = useState("");
25
25
  const [userInfo, setUserInfo] = useState(user);
26
- const [explorerExpanded, setExplorerExpanded] = useState(false);
26
+ const [, setExplorerExpanded] = useState(false);
27
27
  const ichaingoNavList = [
28
28
  {
29
29
  baseUrl: process.env.NEXT_PUBLIC_CHAT_URL,
@@ -37,15 +37,13 @@ function Nav({ onClick = () => void 0, hideNews = false, hideLogin = false, user
37
37
  {
38
38
  baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
39
39
  href: gotoAISQL({ locale }),
40
- key: "/sql",
41
- label: "iSQL",
40
+ key: "/query",
41
+ label: "iQuery",
42
42
  show: (pathname2) => {
43
- return pathname2.includes(`/${locale}/sql`);
43
+ return pathname2.includes(`/${locale}/query`);
44
44
  }
45
45
  },
46
46
  {
47
- baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
48
- href: `/explorer`,
49
47
  key: "/explorer",
50
48
  label: /* @__PURE__ */ jsx(Explorer, { onClick, onExpandChange: setExplorerExpanded }),
51
49
  show: (pathname2) => {
@@ -88,14 +86,12 @@ function Nav({ onClick = () => void 0, hideNews = false, hideLogin = false, user
88
86
  }
89
87
  ]?.filter((item) => {
90
88
  if (hideNews) {
91
- return !["/explorer", "/chat", "/sql"].includes(item.key);
89
+ return !["/explorer", "/chat", "/query"].includes(item.key);
92
90
  }
93
91
  return true;
94
92
  });
95
93
  const chaindiggNavList = [
96
94
  {
97
- baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
98
- href: `/explorer`,
99
95
  key: "/explorer",
100
96
  label: /* @__PURE__ */ jsx(Explorer, {}),
101
97
  show: (pathname2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xchain/header",
3
- "version": "1.1.0-beta.45",
3
+ "version": "1.1.0-beta.47",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -42,19 +42,19 @@
42
42
  "tailwind-merge": "3.3.1"
43
43
  },
44
44
  "dependencies": {
45
- "@0xchain/i18n": "1.1.0-beta.45",
46
- "@0xchain/auth": "1.1.0-beta.45",
47
- "@0xchain/link": "1.1.0-beta.45",
48
- "@0xchain/translation": "1.1.0-beta.45",
49
- "@0xchain/image": "1.1.0-beta.45",
50
- "@0xchain/better-link": "1.1.0-beta.45",
51
- "@0xchain/avatar": "1.1.0-beta.45",
52
- "@0xchain/ui": "1.1.0-beta.45",
53
- "@0xchain/theme-toggle": "1.1.0-beta.45",
54
- "@0xchain/with-login": "1.1.0-beta.45",
55
- "@0xchain/iconfont": "1.1.0-beta.45",
56
- "@0xchain/tooltip": "1.1.0-beta.45",
57
- "@0xchain/request": "1.1.0-beta.45"
45
+ "@0xchain/i18n": "1.1.0-beta.46",
46
+ "@0xchain/auth": "1.1.0-beta.46",
47
+ "@0xchain/avatar": "1.1.0-beta.46",
48
+ "@0xchain/link": "1.1.0-beta.46",
49
+ "@0xchain/translation": "1.1.0-beta.46",
50
+ "@0xchain/iconfont": "1.1.0-beta.46",
51
+ "@0xchain/theme-toggle": "1.1.0-beta.46",
52
+ "@0xchain/ui": "1.1.0-beta.46",
53
+ "@0xchain/better-link": "1.1.0-beta.46",
54
+ "@0xchain/with-login": "1.1.0-beta.46",
55
+ "@0xchain/image": "1.1.0-beta.46",
56
+ "@0xchain/tooltip": "1.1.0-beta.46",
57
+ "@0xchain/request": "1.1.0-beta.46"
58
58
  },
59
59
  "nx": {
60
60
  "tags": [