decane-connect-kit 2.8.0 → 2.8.1
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 +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7079,6 +7079,7 @@ function useSocialAuth() {
|
|
|
7079
7079
|
const {
|
|
7080
7080
|
socialAuth,
|
|
7081
7081
|
connectWithGoogle,
|
|
7082
|
+
connectWithKingsChat,
|
|
7082
7083
|
connectWithEmail,
|
|
7083
7084
|
verifyEmailCode: verifyEmailCode2,
|
|
7084
7085
|
connectWithPhone,
|
|
@@ -7091,6 +7092,7 @@ function useSocialAuth() {
|
|
|
7091
7092
|
socialDisconnect
|
|
7092
7093
|
} = useDecaneContext();
|
|
7093
7094
|
const [googleLoading, setGoogleLoading] = (0, import_react6.useState)(false);
|
|
7095
|
+
const [kingschatLoading, setKingschatLoading] = (0, import_react6.useState)(false);
|
|
7094
7096
|
const [emailLoading, setEmailLoading] = (0, import_react6.useState)(false);
|
|
7095
7097
|
const [phoneLoading, setPhoneLoading] = (0, import_react6.useState)(false);
|
|
7096
7098
|
const [tokenLoading, setTokenLoading] = (0, import_react6.useState)(false);
|
|
@@ -7106,6 +7108,18 @@ function useSocialAuth() {
|
|
|
7106
7108
|
setGoogleLoading(false);
|
|
7107
7109
|
}
|
|
7108
7110
|
}, [connectWithGoogle]);
|
|
7111
|
+
const signInWithKingsChat = (0, import_react6.useCallback)(async () => {
|
|
7112
|
+
setKingschatLoading(true);
|
|
7113
|
+
setError(null);
|
|
7114
|
+
try {
|
|
7115
|
+
await connectWithKingsChat();
|
|
7116
|
+
} catch (e) {
|
|
7117
|
+
setError(e.message);
|
|
7118
|
+
throw e;
|
|
7119
|
+
} finally {
|
|
7120
|
+
setKingschatLoading(false);
|
|
7121
|
+
}
|
|
7122
|
+
}, [connectWithKingsChat]);
|
|
7109
7123
|
const sendEmailCode = (0, import_react6.useCallback)(async (email) => {
|
|
7110
7124
|
setEmailLoading(true);
|
|
7111
7125
|
setError(null);
|
|
@@ -7225,6 +7239,7 @@ function useSocialAuth() {
|
|
|
7225
7239
|
// this into a real reconnect (signInWithGoogle / sendEmailCode), not unlock().
|
|
7226
7240
|
needsReconnect: socialAuth.needsReconnect,
|
|
7227
7241
|
googleLoading,
|
|
7242
|
+
kingschatLoading,
|
|
7228
7243
|
emailLoading,
|
|
7229
7244
|
phoneLoading,
|
|
7230
7245
|
tokenLoading,
|
|
@@ -7233,6 +7248,7 @@ function useSocialAuth() {
|
|
|
7233
7248
|
error,
|
|
7234
7249
|
clearError: () => setError(null),
|
|
7235
7250
|
signInWithGoogle,
|
|
7251
|
+
signInWithKingsChat,
|
|
7236
7252
|
sendEmailCode,
|
|
7237
7253
|
confirmEmailCode,
|
|
7238
7254
|
sendPhoneCode,
|