@ichaingo/header 1.4.19 → 1.4.21

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/Logo.js CHANGED
@@ -2,14 +2,14 @@
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import o from "@ichaingo/image";
4
4
  import t from "@ichaingo/link";
5
- import { twMerge as i } from "tailwind-merge";
5
+ import { twMerge as e } from "tailwind-merge";
6
6
  function p() {
7
- return /* @__PURE__ */ r(t, { suppressHydrationWarning: !0, href: "/", baseUrl: process.env.NEXT_PUBLIC_APP_URL, className: i(
7
+ return /* @__PURE__ */ r(t, { suppressHydrationWarning: !0, href: "/", baseUrl: process.env.NEXT_PUBLIC_BASE_URL, className: e(
8
8
  "w-auto shrink-0 block cursor-pointer"
9
9
  ), children: /* @__PURE__ */ r(
10
10
  o,
11
11
  {
12
- src: "https://cdn.ichatgo.ai/uploads/2025/11/25/692584a0123c9.png",
12
+ src: `${process.env.NEXT_PUBLIC_CDN_URL}/uploads/2025/11/25/692584a0123c9`,
13
13
  width: 232,
14
14
  height: 64,
15
15
  alt: "logo",
package/dist/lib/Nav.js CHANGED
@@ -1,23 +1,23 @@
1
1
  'use client';
2
2
  import { jsx as e, jsxs as m, Fragment as w } from "react/jsx-runtime";
3
- import P from "@ichaingo/link";
3
+ import E from "@ichaingo/link";
4
4
  import L from "./User/index.js";
5
5
  import _ from "./Setting/index.js";
6
6
  import l from "@ichaingo/translation";
7
7
  import { twMerge as n } from "tailwind-merge";
8
8
  import v from "@ichaingo/better-link";
9
- import { useLocale as E } from "next-intl";
10
- import N from "./User/Logout.js";
11
- import { useState as f, useCallback as k, useEffect as I } from "react";
12
- import T from "./User/SignIn.js";
13
- import { fetchUserProfile as A } from "@ichaingo/auth";
14
- import { onUserEvent as j, cleanUserEvent as R, USER_EVENTS as d } from "./events.js";
15
- import { usePathname as S } from "next/navigation";
9
+ import { useLocale as N } from "next-intl";
10
+ import S from "./User/Logout.js";
11
+ import { useState as f, useCallback as k, useEffect as B } from "react";
12
+ import P from "./User/SignIn.js";
13
+ import { fetchUserProfile as I } from "@ichaingo/auth";
14
+ import { onUserEvent as T, cleanUserEvent as A, USER_EVENTS as d } from "./events.js";
15
+ import { usePathname as j } from "next/navigation";
16
16
  function G({ onClick: t = () => {
17
17
  }, hideNews: p = !1, hideLogin: u = !1, user: c }) {
18
- const { gotoAISQL: h } = v(), U = E(), o = S(), [x, g] = f(""), [s, b] = f(c), y = [
18
+ const { gotoAISQL: h } = v(), U = N(), o = j(), [x, g] = f(""), [s, b] = f(c), y = [
19
19
  {
20
- baseUrl: process.env.NEXT_PUBLIC_APP_URL,
20
+ baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
21
21
  href: "/explorer",
22
22
  key: "/explorer",
23
23
  label: /* @__PURE__ */ e("span", { className: "whitespace-nowrap leading-11 md:leading-[34px]", children: /* @__PURE__ */ e(l, { value: "title", parentKey: "browser" }) })
@@ -32,36 +32,36 @@ function G({ onClick: t = () => {
32
32
  // </span>,
33
33
  // },
34
34
  {
35
- baseUrl: process.env.NEXT_PUBLIC_APP_URL,
35
+ baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
36
36
  href: h({ locale: U }),
37
37
  key: "/sql",
38
38
  label: "AISQL"
39
39
  },
40
40
  {
41
- baseUrl: process.env.NEXT_PUBLIC_APP_URL,
41
+ baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
42
42
  href: "/etf/btc-us",
43
43
  key: "/etf",
44
44
  label: /* @__PURE__ */ e(l, { value: "etf", parentKey: "menu" })
45
45
  },
46
46
  {
47
- baseUrl: process.env.NEXT_PUBLIC_APP_URL,
47
+ baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
48
48
  href: "/news",
49
49
  key: "/news",
50
50
  label: /* @__PURE__ */ e(l, { value: "news", parentKey: "menu" })
51
51
  },
52
52
  {
53
- baseUrl: process.env.NEXT_PUBLIC_APP_URL,
53
+ baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
54
54
  href: "/ranking/token",
55
55
  key: "/ranking",
56
56
  label: /* @__PURE__ */ e(l, { value: "ranking", parentKey: "menu" })
57
57
  }
58
58
  ].filter((r) => p ? !["/explorer", "/chat", "/sql"].includes(r.key) : !0), i = k(() => new Promise((r) => {
59
- A().then((a) => {
59
+ I().then((a) => {
60
60
  b(a), g((/* @__PURE__ */ new Date()).getTime().toString()), r(a);
61
61
  });
62
62
  }), []);
63
- return I(() => (j(d.PROFILE_UPDATED, i), () => {
64
- R(d.PROFILE_UPDATED, i);
63
+ return B(() => (T(d.PROFILE_UPDATED, i), () => {
64
+ A(d.PROFILE_UPDATED, i);
65
65
  }), []), /* @__PURE__ */ m(
66
66
  "nav",
67
67
  {
@@ -79,13 +79,13 @@ function G({ onClick: t = () => {
79
79
  "md:flex-row md:items-center md:w-auto md:h-[34px] md:leading-[34px] md:gap-6",
80
80
  "order-2 md:order-0"
81
81
  ),
82
- children: y.map((r, a) => /* @__PURE__ */ e("li", { className: n("w-full md:w-auto h-11 md:h-auto cursor-pointer", o.includes(r.key) && "border-b-2 border-primary text-primary "), children: /* @__PURE__ */ e(P, { href: r.href, onClick: t, className: "h-full flex items-center justify-start", baseUrl: r.baseUrl, suppressHydrationWarning: !0, children: r.label }) }, a))
82
+ children: y.map((r, a) => /* @__PURE__ */ e("li", { className: n("w-full md:w-auto h-11 md:h-auto cursor-pointer", o.includes(r.key) && "border-b-2 border-primary text-primary "), children: /* @__PURE__ */ e(E, { href: r.href, onClick: t, className: "h-full flex items-center justify-start", baseUrl: r.baseUrl, suppressHydrationWarning: !0, children: r.label }) }, a))
83
83
  }
84
84
  ),
85
85
  /* @__PURE__ */ e(_, { onClick: t }),
86
86
  !o.includes("/login") && !u ? /* @__PURE__ */ m(w, { children: [
87
87
  /* @__PURE__ */ e(L, { onClick: t, userInfo: s }, x),
88
- s != null && s.id ? /* @__PURE__ */ e("div", { className: "flex md:hidden h-11 md:h-auto cursor-pointer whitespace-nowrap order-3 bg-background rounded-lg p-2 mt-3 w-full items-center justify-center text-subtitle", children: /* @__PURE__ */ e(N, {}) }) : /* @__PURE__ */ e(T, { onClick: t, className: "flex md:hidden h-11 cursor-pointer whitespace-nowrap order-3 bg-primary text-white rounded-lg p-2 mt-3 w-full items-center justify-center" })
88
+ s != null && s.id ? /* @__PURE__ */ e("div", { className: "flex md:hidden h-11 md:h-auto cursor-pointer whitespace-nowrap order-3 bg-background rounded-lg p-2 mt-3 w-full items-center justify-center text-subtitle", children: /* @__PURE__ */ e(S, {}) }) : /* @__PURE__ */ e(P, { onClick: t, className: "flex md:hidden h-11 cursor-pointer whitespace-nowrap order-3 bg-primary text-white rounded-lg p-2 mt-3 w-full items-center justify-center" })
89
89
  ] }) : null
90
90
  ]
91
91
  }
@@ -28,7 +28,7 @@ function b({
28
28
  "dd",
29
29
  {
30
30
  className: "flex justify-start items-center gap-2 py-2",
31
- children: /* @__PURE__ */ e(i, { href: `/${a.href}`, className: "flex-1 py-2", onClick: t, suppressHydrationWarning: !0, baseUrl: process.env.NEXT_PUBLIC_APP_URL, children: /* @__PURE__ */ e(o, { value: a.name, parentKey: "account" }) })
31
+ children: /* @__PURE__ */ e(i, { href: `/${a.href}`, className: "flex-1 py-2", onClick: t, suppressHydrationWarning: !0, baseUrl: process.env.NEXT_PUBLIC_BASE_URL, children: /* @__PURE__ */ e(o, { value: a.name, parentKey: "account" }) })
32
32
  },
33
33
  a.name
34
34
  )) }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichaingo/header",
3
- "version": "1.4.19",
3
+ "version": "1.4.21",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "@radix-ui/react-popover": "^1.1.4",
22
22
  "js-cookie": "^3.0.5",
23
23
  "lucide-react": "^0.539.0",
24
- "next-intl": "^4.3.4",
24
+ "next-intl": "^4.5.5",
25
25
  "@ichaingo/next-themes": "^0.4.11",
26
26
  "rc-drawer": "^1.0.1",
27
27
  "react": "^19.1.0",
@@ -29,18 +29,18 @@
29
29
  "rollup-plugin-preserve-use-client": "^1.0.0",
30
30
  "tailwind-merge": "^2.5.5",
31
31
  "next": "15.1.6",
32
- "@ichaingo/link": "1.4.19",
33
- "@ichaingo/image": "1.4.19",
34
- "@ichaingo/ui": "1.4.19",
35
- "@ichaingo/auth": "1.4.19",
36
- "@ichaingo/avatar": "1.4.19",
37
- "@ichaingo/theme-toggle": "1.4.19",
38
- "@ichaingo/better-link": "1.4.19",
39
- "@ichaingo/translation": "1.4.19",
40
- "@ichaingo/i18n": "1.4.19",
41
- "@ichaingo/providers": "1.4.19",
42
- "@ichaingo/request": "1.4.19",
43
- "@ichaingo/iconfont": "1.4.19"
32
+ "@ichaingo/image": "1.4.21",
33
+ "@ichaingo/link": "1.4.21",
34
+ "@ichaingo/translation": "1.4.21",
35
+ "@ichaingo/ui": "1.4.21",
36
+ "@ichaingo/better-link": "1.4.21",
37
+ "@ichaingo/auth": "1.4.21",
38
+ "@ichaingo/i18n": "1.4.21",
39
+ "@ichaingo/request": "1.4.21",
40
+ "@ichaingo/iconfont": "1.4.21",
41
+ "@ichaingo/avatar": "1.4.21",
42
+ "@ichaingo/theme-toggle": "1.4.21",
43
+ "@ichaingo/providers": "1.4.21"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/js-cookie": "^3.0.6"