@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/hooks/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -2051,11 +2051,11 @@ function useUserInfo() {
|
|
|
2051
2051
|
};
|
|
2052
2052
|
const getLoginEmailCode = async (email) => {
|
|
2053
2053
|
const res = await getEmailCodeApi(email);
|
|
2054
|
-
if (
|
|
2054
|
+
if (isSuccess(res)) {
|
|
2055
2055
|
window.sessionStorage.setItem("loginkey", res.data.key);
|
|
2056
2056
|
return res.data.key;
|
|
2057
2057
|
}
|
|
2058
|
-
|
|
2058
|
+
throw new Error(res.message);
|
|
2059
2059
|
};
|
|
2060
2060
|
const loginByEmail = async ({
|
|
2061
2061
|
email,
|
|
@@ -3440,8 +3440,8 @@ function StepVerify(props) {
|
|
|
3440
3440
|
try {
|
|
3441
3441
|
setError("");
|
|
3442
3442
|
setSending(true);
|
|
3443
|
-
sendTimeRef.current = intervalTime;
|
|
3444
3443
|
await getLoginEmailCode(props.email);
|
|
3444
|
+
sendTimeRef.current = intervalTime;
|
|
3445
3445
|
setSendBtnText(`${sendTimeRef.current}s`);
|
|
3446
3446
|
intervalRef.current = setInterval(() => {
|
|
3447
3447
|
sendTimeRef.current--;
|