Reduce CountDownInput args.

This commit is contained in:
Gucheng Wang
2021-11-28 20:57:14 +08:00
parent 36b7993994
commit d224e728a3
6 changed files with 20 additions and 53 deletions

View File

@ -341,33 +341,13 @@ class ForgetPage extends React.Component {
>
{this.state.verifyType === "email" ? (
<CountDownInput
disabled={this.state.username === "" || this.state.verifyType === ""}
placeHolder={i18next.t("code:Verify code")}
defaultButtonText={i18next.t("code:Send Code")}
onButtonClick={UserBackend.sendCode}
onButtonClickArgs={[
this.state.email,
"email",
this.state.application?.organizationObj.owner +
"/" +
this.state.application?.organizationObj.name,
]}
coolDownTime={60}
disabled={this.state.username === "" || this.state.verifyType === ""}
onButtonClickArgs={[this.state.email, "email", Setting.getApplicationOrgName(this.state.application)]}
/>
) : (
<CountDownInput
disabled={this.state.username === "" || this.state.verifyType === ""}
placeHolder={i18next.t("code:Verify code")}
defaultButtonText={i18next.t("code:Send Code")}
onButtonClick={UserBackend.sendCode}
onButtonClickArgs={[
this.state.phone,
"phone",
this.state.application?.organizationObj.owner +
"/" +
this.state.application?.organizationObj.name,
]}
coolDownTime={60}
disabled={this.state.username === "" || this.state.verifyType === ""}
onButtonClickArgs={[this.state.phone, "phone", Setting.getApplicationOrgName(this.state.application)]}
/>
)}
</Form.Item>