@loafmarkets/ui 0.1.422 → 0.1.423

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/index.mjs CHANGED
@@ -7644,6 +7644,7 @@ var LoginPopup = ({
7644
7644
  onFundWallet,
7645
7645
  initialView,
7646
7646
  initialCode,
7647
+ defaultHandle,
7647
7648
  kycStatus: kycStatusProp,
7648
7649
  walletAddress,
7649
7650
  onSubmitReferralCode,
@@ -7654,6 +7655,12 @@ var LoginPopup = ({
7654
7655
  const [view, setView] = useState(() => initialView ?? "main");
7655
7656
  const [email, setEmail] = useState("");
7656
7657
  const [handle, setHandle] = useState("");
7658
+ const seededDefaultHandleRef = React9__default.useRef(null);
7659
+ useEffect(() => {
7660
+ if (!defaultHandle || seededDefaultHandleRef.current === defaultHandle) return;
7661
+ seededDefaultHandleRef.current = defaultHandle;
7662
+ setHandle((current) => current ? current : defaultHandle);
7663
+ }, [defaultHandle]);
7657
7664
  const [otp, setOtp] = useState(Array(OTP_INPUT_LENGTH).fill(""));
7658
7665
  const [error, setError] = useState("");
7659
7666
  const [copied, setCopied] = useState(false);