nftychat-universe 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js
CHANGED
@@ -12458,6 +12458,9 @@ function DmButton$1(props) {
|
|
12458
12458
|
}
|
12459
12459
|
async function getMessages() {
|
12460
12460
|
const tempAccessToken = await getAccessToken();
|
12461
|
+
if ([undefined, null, ""].includes(tempAccessToken)) {
|
12462
|
+
return;
|
12463
|
+
}
|
12461
12464
|
const tempConvo = await getConversationData(tempAccessToken);
|
12462
12465
|
if (tempConvo === undefined) {
|
12463
12466
|
setMessages([]);
|
@@ -12629,7 +12632,13 @@ function DmButton$1(props) {
|
|
12629
12632
|
})]
|
12630
12633
|
}), !authenticated ? /*#__PURE__*/jsx("button", {
|
12631
12634
|
className: "universal_support__connect_button",
|
12632
|
-
onClick: () =>
|
12635
|
+
onClick: () => {
|
12636
|
+
if (props.connectWalletFunction) {
|
12637
|
+
props.connectWalletFunction();
|
12638
|
+
} else {
|
12639
|
+
setWalletPopoverOpen(true);
|
12640
|
+
}
|
12641
|
+
},
|
12633
12642
|
children: "Connect to chat"
|
12634
12643
|
}) : /*#__PURE__*/jsxs(Fragment$1, {
|
12635
12644
|
children: [/*#__PURE__*/jsx("textarea", {
|
@@ -12722,7 +12731,8 @@ function UniversalDm$1(props) {
|
|
12722
12731
|
address: props.address,
|
12723
12732
|
chatTitle: props.chatTitle || "Support Chat",
|
12724
12733
|
welcomeMessage: props.welcomeMessage || "Welcome to Support Chat. We typically respond in 24 hours.",
|
12725
|
-
theme: props.theme || "light"
|
12734
|
+
theme: props.theme || "light",
|
12735
|
+
connectWalletFunction: props.connectWalletFunction
|
12726
12736
|
})]
|
12727
12737
|
});
|
12728
12738
|
}
|
@@ -12973,7 +12983,11 @@ function DmButton(props) {
|
|
12973
12983
|
className: "universal_button__button",
|
12974
12984
|
type: "button",
|
12975
12985
|
onClick: event => {
|
12976
|
-
|
12986
|
+
if (props.connectWalletFunction) {
|
12987
|
+
props.connectWalletFunction();
|
12988
|
+
} else {
|
12989
|
+
setWalletPopoverOpen(true);
|
12990
|
+
}
|
12977
12991
|
setPopoverAnchor(event.currentTarget);
|
12978
12992
|
},
|
12979
12993
|
children: [/*#__PURE__*/jsxs("div", {
|
@@ -13222,7 +13236,8 @@ function UniversalDm(props) {
|
|
13222
13236
|
displayText: props.displayText,
|
13223
13237
|
displayName: props.displayName,
|
13224
13238
|
theme: props.theme || "light",
|
13225
|
-
popoverDirection: props.popoverDirection || "top"
|
13239
|
+
popoverDirection: props.popoverDirection || "top",
|
13240
|
+
connectWalletFunction: props.connectWalletFunction
|
13226
13241
|
})]
|
13227
13242
|
});
|
13228
13243
|
}
|
Binary file
|
package/package.json
CHANGED
Binary file
|