@insforge/react 0.5.9 → 0.5.11
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 -3
- package/dist/atoms.cjs.map +1 -1
- package/dist/atoms.js +3 -3
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +3 -3
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +3 -3
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +3 -3
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +3 -3
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -680,7 +680,7 @@ function AuthEmailVerificationStep({
|
|
|
680
680
|
emailSent = false
|
|
681
681
|
}) {
|
|
682
682
|
const { sendVerificationEmail } = useInsforge();
|
|
683
|
-
const [resendDisabled, setResendDisabled] = useState(true);
|
|
683
|
+
const [resendDisabled, setResendDisabled] = useState(emailSent ? true : false);
|
|
684
684
|
const [resendCountdown, setResendCountdown] = useState(emailSent ? 60 : 0);
|
|
685
685
|
const [isSending, setIsSending] = useState(false);
|
|
686
686
|
const [verificationCode, setVerificationCode] = useState("");
|
|
@@ -688,7 +688,7 @@ function AuthEmailVerificationStep({
|
|
|
688
688
|
const isLinkMethod = method === "link";
|
|
689
689
|
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.";
|
|
690
690
|
useEffect(() => {
|
|
691
|
-
if (
|
|
691
|
+
if (resendDisabled && resendCountdown > 0) {
|
|
692
692
|
const timer = setInterval(() => {
|
|
693
693
|
setResendCountdown((prev) => {
|
|
694
694
|
if (prev <= 1) {
|
|
@@ -700,7 +700,7 @@ function AuthEmailVerificationStep({
|
|
|
700
700
|
}, 1e3);
|
|
701
701
|
return () => clearInterval(timer);
|
|
702
702
|
}
|
|
703
|
-
}, [
|
|
703
|
+
}, [resendDisabled, resendCountdown]);
|
|
704
704
|
const handleResend = async () => {
|
|
705
705
|
setResendDisabled(true);
|
|
706
706
|
setResendCountdown(60);
|