nftychat-universe 1.4.8 → 1.4.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.
- package/dist/index.cjs.js +14 -6
- package/dist/index.esm.js +14 -6
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -12415,12 +12415,16 @@ function formatDmMessage(message) {
|
|
12415
12415
|
function InboxButton({
|
12416
12416
|
showRecentMessages,
|
12417
12417
|
setShowRecentMessages,
|
12418
|
-
inboxNotEmpty
|
12418
|
+
inboxNotEmpty,
|
12419
|
+
getConversations
|
12419
12420
|
}) {
|
12420
12421
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
12421
12422
|
children: /*#__PURE__*/jsxRuntime.jsxs("button", {
|
12422
12423
|
className: `universal_dm__inbox ${showRecentMessages ? "universal_dm__inbox__selected" : ""}`,
|
12423
|
-
onClick: () =>
|
12424
|
+
onClick: () => {
|
12425
|
+
getConversations();
|
12426
|
+
setShowRecentMessages(!showRecentMessages);
|
12427
|
+
},
|
12424
12428
|
children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
|
12425
12429
|
className: "universal_dm__inbox_icon",
|
12426
12430
|
icon: "bi:inbox"
|
@@ -12513,7 +12517,8 @@ function DmButton(props) {
|
|
12513
12517
|
}).then(data => {
|
12514
12518
|
setNumberOfNotifications(data);
|
12515
12519
|
});
|
12516
|
-
}, [props.address]);
|
12520
|
+
}, [props.address]); // inbox unread message badge
|
12521
|
+
|
12517
12522
|
React.useEffect(() => {
|
12518
12523
|
if (["", undefined, null].includes(wagmiAddress)) return;
|
12519
12524
|
fetch(mainUrl + "/v1/unread_message_count?address=" + wagmiAddress, {
|
@@ -12702,11 +12707,12 @@ function DmButton(props) {
|
|
12702
12707
|
className: "universal_dm__content universal_dm__top",
|
12703
12708
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
12704
12709
|
className: "universal_dm__title",
|
12705
|
-
children: "
|
12710
|
+
children: " Your Inbox "
|
12706
12711
|
}), /*#__PURE__*/jsxRuntime.jsx(InboxButton, {
|
12707
12712
|
showRecentMessages: showRecentMessages,
|
12708
12713
|
setShowRecentMessages: setShowRecentMessages,
|
12709
|
-
inboxNotEmpty: inboxNotEmpty
|
12714
|
+
inboxNotEmpty: inboxNotEmpty,
|
12715
|
+
getConversations: getConversations
|
12710
12716
|
})]
|
12711
12717
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
12712
12718
|
className: "universal_dm__content",
|
@@ -12761,7 +12767,9 @@ function DmButton(props) {
|
|
12761
12767
|
children: [" Message ", displayName, " "]
|
12762
12768
|
}), /*#__PURE__*/jsxRuntime.jsx(InboxButton, {
|
12763
12769
|
showRecentMessages: showRecentMessages,
|
12764
|
-
setShowRecentMessages: setShowRecentMessages
|
12770
|
+
setShowRecentMessages: setShowRecentMessages,
|
12771
|
+
inboxNotEmpty: inboxNotEmpty,
|
12772
|
+
getConversations: getConversations
|
12765
12773
|
})]
|
12766
12774
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
12767
12775
|
className: "universal_dm__content",
|
package/dist/index.esm.js
CHANGED
@@ -12388,12 +12388,16 @@ function formatDmMessage(message) {
|
|
12388
12388
|
function InboxButton({
|
12389
12389
|
showRecentMessages,
|
12390
12390
|
setShowRecentMessages,
|
12391
|
-
inboxNotEmpty
|
12391
|
+
inboxNotEmpty,
|
12392
|
+
getConversations
|
12392
12393
|
}) {
|
12393
12394
|
return /*#__PURE__*/jsx(Fragment$1, {
|
12394
12395
|
children: /*#__PURE__*/jsxs("button", {
|
12395
12396
|
className: `universal_dm__inbox ${showRecentMessages ? "universal_dm__inbox__selected" : ""}`,
|
12396
|
-
onClick: () =>
|
12397
|
+
onClick: () => {
|
12398
|
+
getConversations();
|
12399
|
+
setShowRecentMessages(!showRecentMessages);
|
12400
|
+
},
|
12397
12401
|
children: [/*#__PURE__*/jsx(Icon, {
|
12398
12402
|
className: "universal_dm__inbox_icon",
|
12399
12403
|
icon: "bi:inbox"
|
@@ -12486,7 +12490,8 @@ function DmButton(props) {
|
|
12486
12490
|
}).then(data => {
|
12487
12491
|
setNumberOfNotifications(data);
|
12488
12492
|
});
|
12489
|
-
}, [props.address]);
|
12493
|
+
}, [props.address]); // inbox unread message badge
|
12494
|
+
|
12490
12495
|
useEffect(() => {
|
12491
12496
|
if (["", undefined, null].includes(wagmiAddress)) return;
|
12492
12497
|
fetch(mainUrl + "/v1/unread_message_count?address=" + wagmiAddress, {
|
@@ -12675,11 +12680,12 @@ function DmButton(props) {
|
|
12675
12680
|
className: "universal_dm__content universal_dm__top",
|
12676
12681
|
children: [/*#__PURE__*/jsx("span", {
|
12677
12682
|
className: "universal_dm__title",
|
12678
|
-
children: "
|
12683
|
+
children: " Your Inbox "
|
12679
12684
|
}), /*#__PURE__*/jsx(InboxButton, {
|
12680
12685
|
showRecentMessages: showRecentMessages,
|
12681
12686
|
setShowRecentMessages: setShowRecentMessages,
|
12682
|
-
inboxNotEmpty: inboxNotEmpty
|
12687
|
+
inboxNotEmpty: inboxNotEmpty,
|
12688
|
+
getConversations: getConversations
|
12683
12689
|
})]
|
12684
12690
|
}), /*#__PURE__*/jsx("div", {
|
12685
12691
|
className: "universal_dm__content",
|
@@ -12734,7 +12740,9 @@ function DmButton(props) {
|
|
12734
12740
|
children: [" Message ", displayName, " "]
|
12735
12741
|
}), /*#__PURE__*/jsx(InboxButton, {
|
12736
12742
|
showRecentMessages: showRecentMessages,
|
12737
|
-
setShowRecentMessages: setShowRecentMessages
|
12743
|
+
setShowRecentMessages: setShowRecentMessages,
|
12744
|
+
inboxNotEmpty: inboxNotEmpty,
|
12745
|
+
getConversations: getConversations
|
12738
12746
|
})]
|
12739
12747
|
}), /*#__PURE__*/jsx("div", {
|
12740
12748
|
className: "universal_dm__content",
|