@matchain/matchid-sdk-react 0.1.51-alpha.2 → 0.1.51
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/{chunk-5W2S6QMI.mjs → chunk-UXFJALFG.mjs} +2 -2
- package/dist/{chunk-OWEJPD4R.mjs → chunk-VIJ4FUT3.mjs} +4 -4
- package/dist/{chunk-OWEJPD4R.mjs.map → chunk-VIJ4FUT3.mjs.map} +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.js +2 -2
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/example/src/components/Login/index.tsx +9 -1
- package/package.json +1 -1
- /package/dist/{chunk-5W2S6QMI.mjs.map → chunk-UXFJALFG.mjs.map} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -3256,11 +3256,11 @@ function useUserInfo() {
|
|
|
3256
3256
|
};
|
|
3257
3257
|
const getLoginEmailCode = async (email) => {
|
|
3258
3258
|
const res = await getEmailCodeApi(email);
|
|
3259
|
-
if (
|
|
3259
|
+
if (isSuccess(res)) {
|
|
3260
3260
|
window.sessionStorage.setItem("loginkey", res.data.key);
|
|
3261
3261
|
return res.data.key;
|
|
3262
3262
|
}
|
|
3263
|
-
|
|
3263
|
+
throw new Error(res.message);
|
|
3264
3264
|
};
|
|
3265
3265
|
const loginByEmail = async ({
|
|
3266
3266
|
email,
|
|
@@ -3445,8 +3445,8 @@ function StepVerify(props) {
|
|
|
3445
3445
|
try {
|
|
3446
3446
|
setError("");
|
|
3447
3447
|
setSending(true);
|
|
3448
|
-
sendTimeRef.current = intervalTime;
|
|
3449
3448
|
await getLoginEmailCode(props.email);
|
|
3449
|
+
sendTimeRef.current = intervalTime;
|
|
3450
3450
|
setSendBtnText(`${sendTimeRef.current}s`);
|
|
3451
3451
|
intervalRef.current = setInterval(() => {
|
|
3452
3452
|
sendTimeRef.current--;
|