@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/forms.js CHANGED
@@ -624,6 +624,7 @@ function AuthVerificationCodeInput({
624
624
  )) });
625
625
  }
626
626
  var InsforgeContext = createContext(void 0);
627
+ InsforgeContext.displayName = "InsforgeContext";
627
628
  function useInsforge() {
628
629
  const context = useContext(InsforgeContext);
629
630
  if (!context) {
@@ -668,7 +669,7 @@ function AuthEmailVerificationStep({
668
669
  const isLinkMethod = method === "link";
669
670
  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.";
670
671
  useEffect(() => {
671
- if (emailSent && resendCountdown > 0) {
672
+ if (resendDisabled && resendCountdown > 0) {
672
673
  const timer = setInterval(() => {
673
674
  setResendCountdown((prev) => {
674
675
  if (prev <= 1) {
@@ -680,7 +681,7 @@ function AuthEmailVerificationStep({
680
681
  }, 1e3);
681
682
  return () => clearInterval(timer);
682
683
  }
683
- }, [emailSent, resendCountdown]);
684
+ }, [resendDisabled, resendCountdown]);
684
685
  const handleResend = async () => {
685
686
  setResendDisabled(true);
686
687
  setResendCountdown(60);