@ichaingo/header 1.4.36 → 1.4.38
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/User/MainTrigger.js +9 -9
- package/dist/lib/User/SignIn.js +20 -24
- package/package.json +14 -13
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { useState as m, useMemo as c, useEffect as
|
|
4
|
-
import
|
|
3
|
+
import { useState as m, useMemo as c, useEffect as s } from "react";
|
|
4
|
+
import p from "@ichaingo/link";
|
|
5
5
|
import l from "@ichaingo/translation";
|
|
6
|
-
import
|
|
7
|
-
import { useLocale as
|
|
8
|
-
import
|
|
6
|
+
import u from "@ichaingo/better-link";
|
|
7
|
+
import { useLocale as f } from "next-intl";
|
|
8
|
+
import g from "@ichaingo/avatar";
|
|
9
9
|
function v({
|
|
10
10
|
userInfo: t
|
|
11
11
|
}) {
|
|
12
|
-
const { gotoLogin: e } =
|
|
13
|
-
return
|
|
12
|
+
const { gotoLogin: e } = u(), [i, a] = m(""), o = f(), n = c(() => t == null ? void 0 : t.id, [t]);
|
|
13
|
+
return s(() => {
|
|
14
14
|
a(e({
|
|
15
15
|
locale: o,
|
|
16
16
|
redirect: window.location.href
|
|
@@ -18,9 +18,9 @@ function v({
|
|
|
18
18
|
}, [o, e]), n ? (
|
|
19
19
|
// userInfo?.profileUrl
|
|
20
20
|
// https://images.ichatgo.ai/user-profile/100000201.png
|
|
21
|
-
/* @__PURE__ */ r(
|
|
21
|
+
/* @__PURE__ */ r(g, { userInfo: t, className: "w-8 h-8" })
|
|
22
22
|
) : /* @__PURE__ */ r(
|
|
23
|
-
|
|
23
|
+
p,
|
|
24
24
|
{
|
|
25
25
|
href: i,
|
|
26
26
|
className: "cursor-pointer text-sm text-white bg-primary py-2 px-3 rounded-lg",
|
package/dist/lib/User/SignIn.js
CHANGED
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import a from "@ichaingo/link";
|
|
3
|
-
import { useLocale as m } from "next-intl";
|
|
4
|
-
import c from "@ichaingo/better-link";
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
5
2
|
import p from "@ichaingo/translation";
|
|
6
|
-
import { twMerge as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, [r, e]), /* @__PURE__ */ o(
|
|
17
|
-
a,
|
|
3
|
+
import { twMerge as a } from "tailwind-merge";
|
|
4
|
+
import { useLogin as m, OpenLoginType as u } from "@ichaingo/with-login";
|
|
5
|
+
import { useCallback as g } from "react";
|
|
6
|
+
function y({ onClick: r = () => {
|
|
7
|
+
}, className: t }) {
|
|
8
|
+
const { openLogin: o, LoginModal: n } = m({}), i = g(() => {
|
|
9
|
+
o(u.LOGIN), r == null || r();
|
|
10
|
+
}, [o, r]);
|
|
11
|
+
return /* @__PURE__ */ s(
|
|
12
|
+
"div",
|
|
18
13
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
replace: !0,
|
|
23
|
-
className: f(
|
|
14
|
+
onClick: i,
|
|
15
|
+
style: { cursor: "pointer" },
|
|
16
|
+
className: a(
|
|
24
17
|
"cursor-pointer text-sm text-white bg-primary py-2 px-3 rounded-lg",
|
|
25
|
-
|
|
18
|
+
t
|
|
26
19
|
),
|
|
27
|
-
children:
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ e(p, { value: "signIn", parentKey: "account" }),
|
|
22
|
+
/* @__PURE__ */ e(n, {})
|
|
23
|
+
]
|
|
28
24
|
}
|
|
29
25
|
);
|
|
30
26
|
}
|
|
31
27
|
export {
|
|
32
|
-
|
|
28
|
+
y as default
|
|
33
29
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichaingo/header",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -29,18 +29,19 @@
|
|
|
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/auth": "1.4.
|
|
33
|
-
"@ichaingo/
|
|
34
|
-
"@ichaingo/image": "1.4.
|
|
35
|
-
"@ichaingo/
|
|
36
|
-
"@ichaingo/link": "1.4.
|
|
37
|
-
"@ichaingo/ui": "1.4.
|
|
38
|
-
"@ichaingo/
|
|
39
|
-
"@ichaingo/
|
|
40
|
-
"@ichaingo/
|
|
41
|
-
"@ichaingo/
|
|
42
|
-
"@ichaingo/
|
|
43
|
-
"@ichaingo/
|
|
32
|
+
"@ichaingo/auth": "1.4.38",
|
|
33
|
+
"@ichaingo/avatar": "1.4.38",
|
|
34
|
+
"@ichaingo/image": "1.4.38",
|
|
35
|
+
"@ichaingo/link": "1.4.38",
|
|
36
|
+
"@ichaingo/better-link": "1.4.38",
|
|
37
|
+
"@ichaingo/ui": "1.4.38",
|
|
38
|
+
"@ichaingo/theme-toggle": "1.4.38",
|
|
39
|
+
"@ichaingo/providers": "1.4.38",
|
|
40
|
+
"@ichaingo/request": "1.4.38",
|
|
41
|
+
"@ichaingo/with-login": "1.4.38",
|
|
42
|
+
"@ichaingo/iconfont": "1.4.38",
|
|
43
|
+
"@ichaingo/translation": "1.4.38",
|
|
44
|
+
"@ichaingo/i18n": "1.4.38"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@types/js-cookie": "^3.0.6"
|