This commit is contained in:
parent
67466cb3cd
commit
86292da531
|
|
@ -88,13 +88,13 @@ export function MixSignUp(props: {
|
||||||
setTransferLoading(false);
|
setTransferLoading(false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const signUpWithCode = async (email: string, password: string) => {
|
const signUpWithCode = async (username: string, password: string) => {
|
||||||
|
|
||||||
console.log("-------------", email)
|
console.log("-------------", username)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
isLoading ||
|
isLoading ||
|
||||||
typeof email !== "string"
|
typeof username !== "string"
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -120,20 +120,12 @@ export function MixSignUp(props: {
|
||||||
toast.success(result.header.message)
|
toast.success(result.header.message)
|
||||||
props.setVerification(true);
|
props.setVerification(true);
|
||||||
|
|
||||||
// 自身方法
|
|
||||||
// localStorage.setItem("data", JSON.stringify(result.data));
|
|
||||||
// []方法
|
|
||||||
{ {/* localStorage["name"]="bonly"; */ } }
|
{ {/* localStorage["name"]="bonly"; */ } }
|
||||||
|
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
// if (err.errors[0].code === "form_identifier_not_found") {
|
|
||||||
// props.setAccountNotFound(true);
|
|
||||||
// props.email(email);
|
|
||||||
// } else {
|
|
||||||
// props.setError("Sorry, We couldn't sign you in. Please try again later");
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
|
@ -190,7 +182,6 @@ export function MixSignUp(props: {
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
autoComplete="on"
|
autoComplete="on"
|
||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
required
|
|
||||||
className="h-10 text-black duration-500 bg-transparent focus:text-black border-black/20 focus:bg-white focus:border-black rounded hover:bg-white/20 hover:border-black/40 placeholder:black/20 "
|
className="h-10 text-black duration-500 bg-transparent focus:text-black border-black/20 focus:bg-white focus:border-black rounded hover:bg-white/20 hover:border-black/40 placeholder:black/20 "
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -201,7 +192,6 @@ export function MixSignUp(props: {
|
||||||
className="flex items-center justify-center h-10 gap-2 px-4 mt-8 text-sm font-semibold text-white duration-200 bg-black border border-black rounded hover:border-black/30 hover:bg-black/80 hover:text-white"
|
className="flex items-center justify-center h-10 gap-2 px-4 mt-8 text-sm font-semibold text-white duration-200 bg-black border border-black rounded hover:border-black/30 hover:bg-black/80 hover:text-white"
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
>
|
>
|
||||||
{/* {isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Sign Up with Email"} */}
|
|
||||||
{t("next")}
|
{t("next")}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
@ -216,7 +206,9 @@ export function MixSignUp(props: {
|
||||||
toast.error("two passwords do not match")
|
toast.error("two passwords do not match")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
await signUpWithCode(props.emailValue, password)
|
await signUpWithCode(props.emailValue, password)
|
||||||
|
|
||||||
setGoPassword(false)
|
setGoPassword(false)
|
||||||
}} >
|
}} >
|
||||||
|
|
||||||
|
|
@ -229,7 +221,6 @@ export function MixSignUp(props: {
|
||||||
name="password"
|
name="password"
|
||||||
placeholder={t("password")}
|
placeholder={t("password")}
|
||||||
type={showPassword ? "text" : "password"}
|
type={showPassword ? "text" : "password"}
|
||||||
// defaultValue={props.passwordValue}
|
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
autoComplete="email"
|
autoComplete="email"
|
||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
|
|
@ -238,7 +229,6 @@ export function MixSignUp(props: {
|
||||||
/>
|
/>
|
||||||
<Image src={showImage} width={16} alt="show" className="absolute right-4 top-3" onClick={() => {
|
<Image src={showImage} width={16} alt="show" className="absolute right-4 top-3" onClick={() => {
|
||||||
setShowPassword(!showPassword)
|
setShowPassword(!showPassword)
|
||||||
// toast.success('coming soon')
|
|
||||||
}} />
|
}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -254,7 +244,6 @@ export function MixSignUp(props: {
|
||||||
name="confirmPassword"
|
name="confirmPassword"
|
||||||
placeholder={t("confirm_password")}
|
placeholder={t("confirm_password")}
|
||||||
type={showPassword2 ? "text" : "password"}
|
type={showPassword2 ? "text" : "password"}
|
||||||
// defaultValue={props.passwordValue}
|
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
autoComplete="password"
|
autoComplete="password"
|
||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
|
|
@ -263,7 +252,6 @@ export function MixSignUp(props: {
|
||||||
/>
|
/>
|
||||||
<Image src={showImage} width={16} alt="show" className="absolute right-4 top-3" onClick={() => {
|
<Image src={showImage} width={16} alt="show" className="absolute right-4 top-3" onClick={() => {
|
||||||
setShowPassword2(!showPassword2)
|
setShowPassword2(!showPassword2)
|
||||||
// toast.success('coming soon')
|
|
||||||
}} />
|
}} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -274,7 +262,6 @@ export function MixSignUp(props: {
|
||||||
className="flex items-center justify-center h-10 gap-2 px-4 mt-8 text-sm font-semibold text-white duration-200 bg-black border border-black rounded hover:border-black/30 hover:bg-black/80 hover:text-white"
|
className="flex items-center justify-center h-10 gap-2 px-4 mt-8 text-sm font-semibold text-white duration-200 bg-black border border-black rounded hover:border-black/30 hover:bg-black/80 hover:text-white"
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
>
|
>
|
||||||
{/* {isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Sign Up with Email"} */}
|
|
||||||
{isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Next"}
|
{isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Next"}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"regname": "User Name",
|
"regname": "User Name",
|
||||||
"referralcode": "Referral Code",
|
"referralcode": "Referral Code",
|
||||||
|
"refcode": "Referral Code (Optional)",
|
||||||
"mixaccount": "Phone/Email",
|
"mixaccount": "Phone/Email",
|
||||||
"first_name": "First Name",
|
"first_name": "First Name",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
|
|
@ -30,7 +31,7 @@
|
||||||
"verification_code": "Six-digit verification code",
|
"verification_code": "Six-digit verification code",
|
||||||
"send_again": "Send Again",
|
"send_again": "Send Again",
|
||||||
"email_address": "Email Address",
|
"email_address": "Email Address",
|
||||||
"refcodeplaceholder": "Enter your referral code",
|
"refcodeplaceholder": "Enter your referral code(Optional)",
|
||||||
"mixplacehoder": "Enter your phone number or Email address",
|
"mixplacehoder": "Enter your phone number or Email address",
|
||||||
"creat_account": "Creat Account",
|
"creat_account": "Creat Account",
|
||||||
"frogot_password": "Frogot password?",
|
"frogot_password": "Frogot password?",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
"email": "邮箱",
|
"email": "邮箱",
|
||||||
"regname": "用户名",
|
"regname": "用户名",
|
||||||
"referralcode":"推荐码",
|
"referralcode":"推荐码",
|
||||||
"refcode": "推荐码",
|
"refcode": "推荐码(选填)",
|
||||||
"mixaccount": "手机号/邮箱地址",
|
"mixaccount": "手机号/邮箱地址",
|
||||||
"first_name": "昵称",
|
"first_name": "昵称",
|
||||||
"password": "密码",
|
"password": "密码",
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
"send_again": "再次发送",
|
"send_again": "再次发送",
|
||||||
"email_address": "电子邮件地址",
|
"email_address": "电子邮件地址",
|
||||||
"mixplacehoder": "输入你的手机号或者邮箱地址",
|
"mixplacehoder": "输入你的手机号或者邮箱地址",
|
||||||
"refcodeplaceholder": "填入你的推荐码",
|
"refcodeplaceholder": "填写你的推荐码(选填)",
|
||||||
"creat_account": "创建帐户",
|
"creat_account": "创建帐户",
|
||||||
"frogot_password": "忘记密码?",
|
"frogot_password": "忘记密码?",
|
||||||
"account_not_found": "未找到帐户,您想注册吗?",
|
"account_not_found": "未找到帐户,您想注册吗?",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue