@insforge/react 0.5.10 → 0.6.0
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/atoms.cjs +3 -2
- package/dist/atoms.cjs.map +1 -1
- package/dist/atoms.js +3 -2
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +3 -2
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +3 -2
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +3 -2
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +3 -2
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs +2 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js +2 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +376 -292
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +377 -293
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/forms.cjs
CHANGED
|
@@ -626,6 +626,7 @@ function AuthVerificationCodeInput({
|
|
|
626
626
|
)) });
|
|
627
627
|
}
|
|
628
628
|
var InsforgeContext = react.createContext(void 0);
|
|
629
|
+
InsforgeContext.displayName = "InsforgeContext";
|
|
629
630
|
function useInsforge() {
|
|
630
631
|
const context = react.useContext(InsforgeContext);
|
|
631
632
|
if (!context) {
|
|
@@ -670,7 +671,7 @@ function AuthEmailVerificationStep({
|
|
|
670
671
|
const isLinkMethod = method === "link";
|
|
671
672
|
const displayDescription = isLinkMethod ? "We've sent an email to {email}. Please check your email to confirm your account before signing in. The confirmation link expires in 10 minutes." : "We've sent a verification code to your inbox at {email}. Enter it below to proceed.";
|
|
672
673
|
react.useEffect(() => {
|
|
673
|
-
if (
|
|
674
|
+
if (resendDisabled && resendCountdown > 0) {
|
|
674
675
|
const timer = setInterval(() => {
|
|
675
676
|
setResendCountdown((prev) => {
|
|
676
677
|
if (prev <= 1) {
|
|
@@ -682,7 +683,7 @@ function AuthEmailVerificationStep({
|
|
|
682
683
|
}, 1e3);
|
|
683
684
|
return () => clearInterval(timer);
|
|
684
685
|
}
|
|
685
|
-
}, [
|
|
686
|
+
}, [resendDisabled, resendCountdown]);
|
|
686
687
|
const handleResend = async () => {
|
|
687
688
|
setResendDisabled(true);
|
|
688
689
|
setResendCountdown(60);
|