@blocklet/ui-react 3.0.9 → 3.0.10

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.
Files changed (51) hide show
  1. package/lib/BlockletStudio/index.js +70 -71
  2. package/lib/ComponentInstaller/index.js +85 -88
  3. package/lib/ComponentInstaller/installer-item.js +47 -53
  4. package/lib/ComponentInstaller/use-component-installed.js +32 -38
  5. package/lib/ComponentManager/components/add-component.js +47 -50
  6. package/lib/ComponentManager/components/publish-component.js +30 -31
  7. package/lib/ComponentManager/components/resource-dialog.js +28 -30
  8. package/lib/Dashboard/index.d.ts +1 -1
  9. package/lib/Dashboard/index.js +59 -61
  10. package/lib/Footer/index.js +51 -52
  11. package/lib/Footer/internal-footer.js +43 -47
  12. package/lib/Footer/layout/standard.js +11 -12
  13. package/lib/Footer/links.js +25 -28
  14. package/lib/Footer/social-media.js +17 -17
  15. package/lib/Header/index.js +81 -83
  16. package/lib/Notifications/Snackbar.js +76 -77
  17. package/lib/Notifications/hooks/use-title.js +34 -34
  18. package/lib/Notifications/utils.js +56 -60
  19. package/lib/UserCenter/components/config-inviter.js +17 -18
  20. package/lib/UserCenter/components/danger-zone.js +49 -52
  21. package/lib/UserCenter/components/nft.js +44 -45
  22. package/lib/UserCenter/components/notification.js +92 -99
  23. package/lib/UserCenter/components/passport.js +22 -22
  24. package/lib/UserCenter/components/privacy.js +6 -6
  25. package/lib/UserCenter/components/settings.js +40 -43
  26. package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
  27. package/lib/UserCenter/components/status-dialog/index.js +112 -114
  28. package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
  29. package/lib/UserCenter/components/status-selector/index.js +13 -13
  30. package/lib/UserCenter/components/storage/action.js +21 -22
  31. package/lib/UserCenter/components/storage/delete.js +24 -24
  32. package/lib/UserCenter/components/third-party-login/index.js +53 -53
  33. package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
  34. package/lib/UserCenter/components/user-center.js +198 -207
  35. package/lib/UserCenter/components/user-info/metadata.js +343 -353
  36. package/lib/UserCenter/components/user-info/switch-role.js +17 -20
  37. package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
  38. package/lib/UserCenter/components/user-info/user-info.js +40 -40
  39. package/lib/UserCenter/components/user-info/user-status.js +97 -99
  40. package/lib/UserCenter/components/user-info/utils.js +34 -35
  41. package/lib/UserSessions/components/user-session-info.js +25 -28
  42. package/lib/UserSessions/components/user-sessions.js +169 -181
  43. package/lib/blocklets.js +62 -72
  44. package/lib/common/domain-warning.js +31 -31
  45. package/lib/common/header-addons.d.ts +1 -1
  46. package/lib/common/header-addons.js +49 -53
  47. package/lib/common/notification-addon.js +29 -32
  48. package/lib/common/ws.js +17 -18
  49. package/lib/contexts/config-user-space.js +16 -19
  50. package/lib/utils.js +44 -48
  51. package/package.json +6 -6
@@ -1,90 +1,86 @@
1
- import L from "lodash/isEmpty";
2
- import $ from "dompurify";
3
- import { toTextList as k, Link as v, getLink as i } from "@abtnode/util/lib/notification-preview/highlight";
4
- import { isSameAddr as h } from "@abtnode/util/lib/notification-preview/func";
5
- import { client as w } from "../libs/client.js";
6
- const M = (s) => {
7
- if (!s || !s.length)
1
+ import h from "lodash/isEmpty";
2
+ import m from "dompurify";
3
+ import { toTextList as v, Link as f, getLink as p } from "@abtnode/util/lib/notification-preview/highlight";
4
+ import { isSameAddr as d } from "@abtnode/util/lib/notification-preview/func";
5
+ import { client as T } from "../libs/client.js";
6
+ const b = (t) => {
7
+ if (!t || !t.length)
8
8
  return [];
9
- const t = [];
10
- let r = null, l = [];
11
- if (s.forEach((a) => {
12
- var c, o, g, y;
13
- if (!a.activity || !a.activity.type || !r) {
14
- r && (l.length === 1 ? t.push(l[0]) : (r.items = l, t.push(r))), a.activity && a.activity.type ? (r = a, l = [a]) : (t.push(a), r = null, l = []);
9
+ const e = [];
10
+ let r = null, a = [];
11
+ if (t.forEach((s) => {
12
+ if (!s.activity || !s.activity.type || !r) {
13
+ r && (a.length === 1 ? e.push(a[0]) : (r.items = a, e.push(r))), s.activity && s.activity.type ? (r = s, a = [s]) : (e.push(s), r = null, a = []);
15
14
  return;
16
15
  }
17
- const e = l[0].activity, n = e == null ? void 0 : e.type, p = (c = e == null ? void 0 : e.target) == null ? void 0 : c.type, u = (o = e == null ? void 0 : e.target) == null ? void 0 : o.id, d = a.activity.type, m = (g = a.activity.target) == null ? void 0 : g.type, f = (y = a.activity.target) == null ? void 0 : y.id;
16
+ const n = a[0].activity, c = n?.type, l = n?.target?.type, i = n?.target?.id, u = s.activity.type, o = s.activity.target?.type, y = s.activity.target?.id;
18
17
  if (
19
18
  // activity.type 必须相同且不为null或undefined
20
- n && d && n === d && // 如果都没有target,可以合并
21
- (!(e != null && e.target) && !a.activity.target || // 如果都有target,则target.type和target.id都必须相同
22
- (e == null ? void 0 : e.target) && a.activity.target && p === m && u === f)
19
+ c && u && c === u && // 如果都没有target,可以合并
20
+ (!n?.target && !s.activity.target || // 如果都有target,则target.type和target.id都必须相同
21
+ n?.target && s.activity.target && l === o && i === y)
23
22
  )
24
- l.push(a);
23
+ a.push(s);
25
24
  else {
26
- if (l.length === 1)
27
- t.push(l[0]);
25
+ if (a.length === 1)
26
+ e.push(a[0]);
28
27
  else {
29
- const T = Object.assign({}, r, { items: l });
30
- t.push(T);
28
+ const g = Object.assign({}, r, { items: a });
29
+ e.push(g);
31
30
  }
32
- r = a, l = [a];
31
+ r = s, a = [s];
33
32
  }
34
33
  }), r)
35
- if (l.length === 1)
36
- t.push(l[0]);
34
+ if (a.length === 1)
35
+ e.push(a[0]);
37
36
  else {
38
- const a = Object.assign({}, r, { items: l });
39
- t.push(a);
37
+ const s = Object.assign({}, r, { items: a });
38
+ e.push(s);
40
39
  }
41
- return t;
42
- }, z = (s) => {
43
- var t, r;
44
- return !L(s.activity) && !!((t = s.activity) != null && t.type) && !!((r = s.activity) != null && r.actor);
45
- }, D = (s) => {
46
- const { severity: t } = s || {};
47
- return !!t && ["normal", "success", "info"].includes(t);
48
- }, R = (s) => {
49
- if (!s)
40
+ return e;
41
+ }, j = (t) => !h(t.activity) && !!t.activity?.type && !!t.activity?.actor, O = (t) => {
42
+ const { severity: e } = t || {};
43
+ return !!e && ["normal", "success", "info"].includes(e);
44
+ }, P = (t) => {
45
+ if (!t)
50
46
  return null;
51
- const { meta: t, target: r } = s;
47
+ const { meta: e, target: r } = t;
52
48
  return {
53
- metaLink: t == null ? void 0 : t.id,
54
- targetLink: r == null ? void 0 : r.id
49
+ metaLink: e?.id,
50
+ targetLink: r?.id
55
51
  };
56
- }, x = async (s, t) => {
52
+ }, L = async (t, e) => {
57
53
  try {
58
- return await w.user.getProfileUrl({ did: s, locale: t });
54
+ return await T.user.getProfileUrl({ did: t, locale: e });
59
55
  } catch (r) {
60
56
  console.error(r);
61
57
  return;
62
58
  }
63
- }, U = async (s, t) => {
64
- const { type: r, did: l } = s;
65
- return h(r, "did") ? await x(l, t) || i(s) : i(s);
66
- }, S = async (s, t, r = !0) => {
67
- const l = k(s);
59
+ }, $ = async (t, e) => {
60
+ const { type: r, did: a } = t;
61
+ return d(r, "did") ? await L(a, e) || p(t) : p(t);
62
+ }, E = async (t, e, r = !0) => {
63
+ const a = v(t);
68
64
  return await Promise.all(
69
- l.map(async (e) => {
70
- if (e instanceof v) {
65
+ a.map(async (n) => {
66
+ if (n instanceof f) {
71
67
  if (r) {
72
- const n = await U(e, t), { type: p, chainId: u, did: d } = e;
73
- return h(p, "dapp") ? `<em class="dapp" data-type="${p}" data-chain-id="${u}" data-did="${d}">${e.text}</em>` : n ? `<a target="_blank" rel="noopener noreferrer" class="link" href="${n}">${e.text}</a>` : `<em class="common" data-type="${p}" data-chain-id="${u}" data-did="${d}">${e.text}</em>`;
68
+ const c = await $(n, e), { type: l, chainId: i, did: u } = n;
69
+ return d(l, "dapp") ? `<em class="dapp" data-type="${l}" data-chain-id="${i}" data-did="${u}">${n.text}</em>` : c ? `<a target="_blank" rel="noopener noreferrer" class="link" href="${c}">${n.text}</a>` : `<em class="common" data-type="${l}" data-chain-id="${i}" data-did="${u}">${n.text}</em>`;
74
70
  }
75
- return e.text;
71
+ return n.text;
76
72
  }
77
- return e;
73
+ return n;
78
74
  })
79
- ).then((e) => e.join(""));
80
- }, _ = (s) => $.sanitize(s, {
75
+ ).then((n) => n.join(""));
76
+ }, M = (t) => m.sanitize(t, {
81
77
  ALLOWED_ATTR: ["href", "target", "rel", "class", "id", "style"]
82
78
  });
83
79
  export {
84
- D as canAutoRead,
85
- R as getActivityLink,
86
- z as isIncludeActivity,
87
- M as mergeAdjacentNotifications,
88
- _ as sanitize,
89
- S as toClickableSpan
80
+ O as canAutoRead,
81
+ P as getActivityLink,
82
+ j as isIncludeActivity,
83
+ b as mergeAdjacentNotifications,
84
+ M as sanitize,
85
+ E as toClickableSpan
90
86
  };
@@ -1,26 +1,25 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { Box as s, TextField as v } from "@mui/material";
3
- import { useReactive as m, useMemoizedFn as c } from "ahooks";
4
- import d from "@arcblock/ux/lib/Toast";
5
- import { client as u } from "../../libs/client.js";
6
- import { formatAxiosError as g } from "../libs/utils.js";
7
- function I({ user: t }) {
8
- var n, r, o;
9
- const i = m({
10
- inviter: t == null ? void 0 : t.inviter,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Box as a, TextField as l } from "@mui/material";
3
+ import { useReactive as s, useMemoizedFn as f } from "ahooks";
4
+ import v from "@arcblock/ux/lib/Toast";
5
+ import { client as m } from "../../libs/client.js";
6
+ import { formatAxiosError as c } from "../libs/utils.js";
7
+ function y({ user: i }) {
8
+ const e = s({
9
+ inviter: i?.inviter,
11
10
  loading: !1
12
- }), l = c(async (f) => {
11
+ }), n = f(async (o) => {
13
12
  try {
14
- const { value: e } = f.target;
15
- i.loading = !0, await u.user.saveProfile({ inviter: e }), i.inviter = e;
16
- } catch (e) {
17
- d.error(g(e));
13
+ const { value: t } = o.target;
14
+ e.loading = !0, await m.user.saveProfile({ inviter: t }), e.inviter = t;
15
+ } catch (t) {
16
+ v.error(c(t));
18
17
  } finally {
19
- i.loading = !1;
18
+ e.loading = !1;
20
19
  }
21
20
  });
22
- return !t || !!!((o = (r = (n = window.blocklet) == null ? void 0 : n.settings) == null ? void 0 : r.invite) != null && o.enabled) || !!t.inviter ? "-" : /* @__PURE__ */ a(s, { children: /* @__PURE__ */ a(v, { size: "small", fullWidth: !0, label: "", value: i.inviter, onChange: l }) });
21
+ return !i || !!!window.blocklet?.settings?.invite?.enabled || !!i.inviter ? "-" : /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(l, { size: "small", fullWidth: !0, label: "", value: e.inviter, onChange: n }) });
23
22
  }
24
23
  export {
25
- I as default
24
+ y as default
26
25
  };
@@ -1,27 +1,25 @@
1
- import { jsxs as d, Fragment as w, jsx as l } from "react/jsx-runtime";
2
- import { use as E } from "react";
3
- import { Box as m, Typography as g, Button as I } from "@mui/material";
4
- import { useLocaleContext as R } from "@arcblock/ux/lib/Locale/context";
5
- import { translate as v } from "@arcblock/ux/lib/Locale/util";
6
- import { useMemoizedFn as f, useCreation as S } from "ahooks";
7
- import { useConfirm as _ } from "@arcblock/ux/lib/Dialog";
8
- import { SessionContext as B } from "@arcblock/did-connect/lib/Session";
9
- import { LOGIN_PROVIDER as F } from "@blocklet/constant";
10
- import u from "@arcblock/ux/lib/Toast";
11
- import { translations as O } from "../libs/locales.js";
12
- import { client as x } from "../../libs/client.js";
13
- function H() {
14
- const { confirmApi: h, confirmHolder: A } = _(), { locale: p } = R(), { session: o, connectApi: y } = E(B), e = f((c, r = {}) => v(O, c, p, "en", r)), M = S(() => {
15
- var s, n;
16
- if (["true", !0].includes((s = window == null ? void 0 : window.blocklet) == null ? void 0 : s.ALLOW_SKIP_DESTROY_MYSELF_VERIFY))
1
+ import { jsxs as l, Fragment as D, jsx as s } from "react/jsx-runtime";
2
+ import { use as L } from "react";
3
+ import { Box as a, Typography as p, Button as w } from "@mui/material";
4
+ import { useLocaleContext as E } from "@arcblock/ux/lib/Locale/context";
5
+ import { translate as I } from "@arcblock/ux/lib/Locale/util";
6
+ import { useMemoizedFn as d, useCreation as R } from "ahooks";
7
+ import { useConfirm as v } from "@arcblock/ux/lib/Dialog";
8
+ import { SessionContext as S } from "@arcblock/did-connect/lib/Session";
9
+ import { LOGIN_PROVIDER as _ } from "@blocklet/constant";
10
+ import m from "@arcblock/ux/lib/Toast";
11
+ import { translations as B } from "../libs/locales.js";
12
+ import { client as y } from "../../libs/client.js";
13
+ function N() {
14
+ const { confirmApi: g, confirmHolder: x } = v(), { locale: f } = E(), { session: n, connectApi: u } = L(S), e = d((r, o = {}) => I(B, r, f, "en", o)), h = R(() => {
15
+ if (["true", !0].includes(window?.blocklet?.ALLOW_SKIP_DESTROY_MYSELF_VERIFY))
17
16
  return !1;
18
- const c = ((n = o == null ? void 0 : o.user) == null ? void 0 : n.connectedAccounts) || [], r = [F.WALLET];
19
- return !!c.some((i) => r.includes(i.provider));
20
- }, [o == null ? void 0 : o.user]), C = f(() => new Promise((c, r) => {
21
- var n;
22
- const s = (n = o == null ? void 0 : o.user) == null ? void 0 : n.did;
23
- y.open({
24
- locale: p,
17
+ const r = n?.user?.connectedAccounts || [], o = [_.WALLET];
18
+ return !!r.some((t) => o.includes(t.provider));
19
+ }, [n?.user]), A = d(() => new Promise((r, o) => {
20
+ const t = n?.user?.did;
21
+ u.open({
22
+ locale: f,
25
23
  action: "destroy-myself",
26
24
  forceConnected: !0,
27
25
  saveConnect: !1,
@@ -29,7 +27,7 @@ function H() {
29
27
  // 暂不允许使用 passkey 进行验证
30
28
  passkeyBehavior: "none",
31
29
  extraParams: {
32
- removeUserDid: s
30
+ removeUserDid: t
33
31
  },
34
32
  messages: {
35
33
  title: e("destroyMyself.title"),
@@ -38,16 +36,16 @@ function H() {
38
36
  success: e("destroyMyself.success")
39
37
  },
40
38
  // @ts-expect-error 该 did-connect 后端api 将结果塞在了 result 中,并做了加密,所以已经变成一个字符串了
41
- onSuccess: ({ result: i }, a = (t) => t) => {
42
- const t = a(i);
43
- c(t);
39
+ onSuccess: ({ result: c }, C = (i) => i) => {
40
+ const i = C(c);
41
+ r(i);
44
42
  },
45
43
  onClose: () => {
46
- y.close(), r(new Error(e("destroyMyself.abort")));
44
+ u.close(), o(new Error(e("destroyMyself.abort")));
47
45
  }
48
46
  });
49
- })), D = f(() => {
50
- h.open({
47
+ })), M = d(() => {
48
+ g.open({
51
49
  title: e("dangerZone.deleteAccount"),
52
50
  content: e("dangerZone.deleteAccountDescription"),
53
51
  confirmButtonText: e("common.confirm"),
@@ -55,29 +53,28 @@ function H() {
55
53
  color: "error"
56
54
  },
57
55
  cancelButtonText: e("common.cancel"),
58
- async onConfirm(c) {
59
- var s, n, i, a;
60
- let r;
56
+ async onConfirm(r) {
57
+ let o;
61
58
  try {
62
- if (M)
63
- r = await C();
64
- else if (((n = (s = x) == null ? void 0 : s.user) == null ? void 0 : n.destroyMyself) instanceof Function)
65
- r = await x.user.destroyMyself();
59
+ if (h)
60
+ o = await A();
61
+ else if (y?.user?.destroyMyself instanceof Function)
62
+ o = await y.user.destroyMyself();
66
63
  else {
67
- u.error(e("notImplemented"));
64
+ m.error(e("notImplemented"));
68
65
  return;
69
66
  }
70
- (r == null ? void 0 : r.did) === ((i = o == null ? void 0 : o.user) == null ? void 0 : i.did) ? o.logout(c) : u.error(e("destroyMyself.error"));
67
+ o?.did === n?.user?.did ? n.logout(r) : m.error(e("destroyMyself.error"));
71
68
  } catch (t) {
72
- const L = ((a = t == null ? void 0 : t.response) == null ? void 0 : a.data.error) || (t == null ? void 0 : t.message) || e("destroyMyself.error");
73
- u.error(L);
69
+ const c = t?.response?.data.error || t?.message || e("destroyMyself.error");
70
+ m.error(c);
74
71
  }
75
72
  }
76
73
  });
77
74
  });
78
- return /* @__PURE__ */ d(w, { children: [
79
- /* @__PURE__ */ l(m, { children: /* @__PURE__ */ d(
80
- m,
75
+ return /* @__PURE__ */ l(D, { children: [
76
+ /* @__PURE__ */ s(a, { children: /* @__PURE__ */ l(
77
+ a,
81
78
  {
82
79
  sx: {
83
80
  display: "flex",
@@ -87,9 +84,9 @@ function H() {
87
84
  flexWrap: "wrap"
88
85
  },
89
86
  children: [
90
- /* @__PURE__ */ d(m, { children: [
91
- /* @__PURE__ */ l(
92
- g,
87
+ /* @__PURE__ */ l(a, { children: [
88
+ /* @__PURE__ */ s(
89
+ p,
93
90
  {
94
91
  variant: "h6",
95
92
  sx: {
@@ -99,8 +96,8 @@ function H() {
99
96
  children: e("dangerZone.deleteAccount")
100
97
  }
101
98
  ),
102
- /* @__PURE__ */ l(
103
- g,
99
+ /* @__PURE__ */ s(
100
+ p,
104
101
  {
105
102
  variant: "caption",
106
103
  sx: {
@@ -110,13 +107,13 @@ function H() {
110
107
  }
111
108
  )
112
109
  ] }),
113
- /* @__PURE__ */ l(I, { variant: "contained", color: "error", size: "small", onClick: D, children: e("dangerZone.delete") })
110
+ /* @__PURE__ */ s(w, { variant: "contained", color: "error", size: "small", onClick: M, children: e("dangerZone.delete") })
114
111
  ]
115
112
  }
116
113
  ) }),
117
- A
114
+ x
118
115
  ] });
119
116
  }
120
117
  export {
121
- H as default
118
+ N as default
122
119
  };
@@ -1,36 +1,35 @@
1
- import { jsxs as f, jsx as e, Fragment as y } from "react/jsx-runtime";
2
- import { Box as o, Skeleton as g, Typography as w, Pagination as k } from "@mui/material";
3
- import { useMemoizedFn as C, useReactive as b, useRequest as F, useCreation as z } from "ahooks";
4
- import N from "axios";
5
- import P from "@arcblock/ux/lib/NFTDisplay";
6
- import R from "@arcblock/ux/lib/Empty";
7
- import { WELLKNOWN_SERVICE_PATH_PREFIX as j } from "@abtnode/constant";
8
- import { translate as E } from "@arcblock/ux/lib/Locale/util";
9
- import { useLocaleContext as I } from "@arcblock/ux/lib/Locale/context";
10
- import { translations as S } from "../libs/locales.js";
11
- function H({ user: p }) {
12
- const { locale: x } = I(), d = C((r, n = {}) => E(S, r, x, "en", n)), t = b({
1
+ import { jsxs as c, jsx as e, Fragment as h } from "react/jsx-runtime";
2
+ import { Box as a, Skeleton as f, Typography as u, Pagination as y } from "@mui/material";
3
+ import { useMemoizedFn as w, useReactive as k, useRequest as C, useCreation as b } from "ahooks";
4
+ import F from "axios";
5
+ import z from "@arcblock/ux/lib/NFTDisplay";
6
+ import N from "@arcblock/ux/lib/Empty";
7
+ import { WELLKNOWN_SERVICE_PATH_PREFIX as P } from "@abtnode/constant";
8
+ import { translate as R } from "@arcblock/ux/lib/Locale/util";
9
+ import { useLocaleContext as j } from "@arcblock/ux/lib/Locale/context";
10
+ import { translations as E } from "../libs/locales.js";
11
+ function q({ user: l }) {
12
+ const { locale: g } = j(), d = w((s, r = {}) => R(E, s, g, "en", r)), t = k({
13
13
  page: 1,
14
14
  size: 20
15
- }), m = F(
16
- async (r = t) => (await N.get(`${j}/ocap/listAssets`, {
15
+ }), p = C(
16
+ async (s = t) => (await F.get(`${P}/ocap/listAssets`, {
17
17
  params: {
18
- ownerAddress: p.did,
19
- ...r
18
+ ownerAddress: l.did,
19
+ ...s
20
20
  }
21
21
  })).data,
22
22
  {
23
23
  defaultParams: [t],
24
- refreshDeps: [p.did, t]
24
+ refreshDeps: [l.did, t]
25
25
  }
26
- ), { loading: i, data: s } = m, l = (s == null ? void 0 : s.page) ?? { cursor: 0, next: !1, total: 0 }, c = (r, n) => {
27
- t.page = n, m.run(t);
28
- }, h = z(() => {
29
- var r, n;
30
- if (i) {
31
- const a = ["skeleton-1", "skeleton-2", "skeleton-3", "skeleton-4", "skeleton-5"].map((u) => /* @__PURE__ */ e(g, { variant: "rectangular", width: "15%", height: 166, sx: { borderRadius: 1, flexShrink: 0 } }, u));
32
- return /* @__PURE__ */ f(
33
- o,
26
+ ), { loading: n, data: o } = p, i = o?.page ?? { cursor: 0, next: !1, total: 0 }, m = (s, r) => {
27
+ t.page = r, p.run(t);
28
+ }, x = b(() => {
29
+ if (n) {
30
+ const s = ["skeleton-1", "skeleton-2", "skeleton-3", "skeleton-4", "skeleton-5"].map((r) => /* @__PURE__ */ e(f, { variant: "rectangular", width: "15%", height: 166, sx: { borderRadius: 1, flexShrink: 0 } }, r));
31
+ return /* @__PURE__ */ c(
32
+ a,
34
33
  {
35
34
  sx: {
36
35
  display: "flex",
@@ -38,9 +37,9 @@ function H({ user: p }) {
38
37
  gap: 2
39
38
  },
40
39
  children: [
41
- /* @__PURE__ */ e(g, { width: "20%" }),
40
+ /* @__PURE__ */ e(f, { width: "20%" }),
42
41
  /* @__PURE__ */ e(
43
- o,
42
+ a,
44
43
  {
45
44
  sx: {
46
45
  display: "flex",
@@ -48,16 +47,16 @@ function H({ user: p }) {
48
47
  gap: 2,
49
48
  flexWrap: "nowrap"
50
49
  },
51
- children: a
50
+ children: s
52
51
  }
53
52
  )
54
53
  ]
55
54
  }
56
55
  );
57
56
  }
58
- return /* @__PURE__ */ f(y, { children: [
57
+ return /* @__PURE__ */ c(h, { children: [
59
58
  /* @__PURE__ */ e(
60
- w,
59
+ u,
61
60
  {
62
61
  sx: {
63
62
  color: "grey.A700",
@@ -67,9 +66,9 @@ function H({ user: p }) {
67
66
  children: d("common.nft")
68
67
  }
69
68
  ),
70
- ((r = s == null ? void 0 : s.assets) == null ? void 0 : r.length) === 0 && !i && /* @__PURE__ */ e(o, { sx: { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, children: /* @__PURE__ */ e(R, { children: d("common.noNFT") }) }),
69
+ o?.assets?.length === 0 && !n && /* @__PURE__ */ e(a, { sx: { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, children: /* @__PURE__ */ e(N, { children: d("common.noNFT") }) }),
71
70
  /* @__PURE__ */ e(
72
- o,
71
+ a,
73
72
  {
74
73
  className: "nft-list-wrapper",
75
74
  sx: {
@@ -83,8 +82,8 @@ function H({ user: p }) {
83
82
  },
84
83
  gap: 2.5
85
84
  },
86
- children: (n = s == null ? void 0 : s.assets) == null ? void 0 : n.map((a) => /* @__PURE__ */ e(
87
- o,
85
+ children: o?.assets?.map((s) => /* @__PURE__ */ e(
86
+ a,
88
87
  {
89
88
  sx: {
90
89
  flexShrink: 0,
@@ -92,10 +91,10 @@ function H({ user: p }) {
92
91
  height: { xs: 120, sm: 120, md: 120, lg: 166 }
93
92
  },
94
93
  children: /* @__PURE__ */ e(
95
- P,
94
+ z,
96
95
  {
97
- data: a.display,
98
- address: a.address,
96
+ data: s.display,
97
+ address: s.address,
99
98
  inset: !0,
100
99
  imageFilter: {
101
100
  imageFilter: "resize",
@@ -105,12 +104,12 @@ function H({ user: p }) {
105
104
  }
106
105
  )
107
106
  },
108
- a.address
107
+ s.address
109
108
  ))
110
109
  }
111
110
  ),
112
- l.next || t.page > 1 ? /* @__PURE__ */ e(
113
- k,
111
+ i.next || t.page > 1 ? /* @__PURE__ */ e(
112
+ y,
114
113
  {
115
114
  sx: {
116
115
  display: "flex",
@@ -118,15 +117,15 @@ function H({ user: p }) {
118
117
  mt: 2
119
118
  },
120
119
  page: t.page,
121
- onChange: c,
122
- count: Math.ceil(l.total / t.size),
120
+ onChange: m,
121
+ count: Math.ceil(i.total / t.size),
123
122
  size: "small"
124
123
  }
125
124
  ) : null
126
125
  ] });
127
- }, [i, l, t.page, t.size, c]);
128
- return /* @__PURE__ */ e(o, { sx: { border: "1px solid", borderColor: "divider", borderRadius: 1, p: 2, mb: 5 }, children: h });
126
+ }, [n, i, t.page, t.size, m]);
127
+ return /* @__PURE__ */ e(a, { sx: { border: "1px solid", borderColor: "divider", borderRadius: 1, p: 2, mb: 5 }, children: x });
129
128
  }
130
129
  export {
131
- H as default
130
+ q as default
132
131
  };