fix: fix all frontend warnings (#983)

* fix:fix all frontend warnings

* fix:fix all frontend warnings

* fix:fix all frontend warnings

* fix:fix all frontend warnings

* fix:fix all frontend warnings

* fix:fix all frontend warnings
This commit is contained in:
jakiuncle 2022-08-09 12:19:56 +08:00 committed by GitHub
parent deed857788
commit 4dd67a8dcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View File

@ -103,7 +103,7 @@ export const CropperDiv = (props) => {
onCancel={handleCancel}
width={600}
footer={
[<Button block type="primary" onClick={handleOk}>{i18next.t("user:Set new profile picture")}</Button>]
[<Button block key="submit" type="primary" onClick={handleOk}>{i18next.t("user:Set new profile picture")}</Button>]
}
>
<Col style={{margin: "0px auto 40px auto", width: 1000, height: 300}}>

View File

@ -83,7 +83,7 @@ class PaymentResultPage extends React.Component {
title={`${i18next.t("payment:The payment is still under processing")}: ${payment.productDisplayName}, ${i18next.t("payment:the current state is")}: ${payment.state}, ${i18next.t("payment:please wait for a few seconds...")}`}
subTitle={i18next.t("payment:Please click the below button to return to the original website")}
extra={[
<Spin size="large" tip={i18next.t("payment:Processing...")} />,
<Spin key="returnUrl" size="large" tip={i18next.t("payment:Processing...")} />,
]}
/>
</div>

View File

@ -285,7 +285,7 @@ class LoginPage extends React.Component {
title="Sign Up Error"
subTitle={"The application does not allow to sign up new account"}
extra={[
<Link onClick={() => {
<Link key="login" onClick={() => {
Setting.goToLogin(this, application);
}}>
<Button type="primary" key="signin">

View File

@ -16,7 +16,7 @@ import React from "react";
import * as Setting from "../Setting";
class OdicDiscoveryPage extends React.Component {
componentWillMount() {
UNSAFE_componentWillMount() {
if (Setting.isLocalhost()) {
Setting.goToLink(`${Setting.ServerUrl}/.well-known/openid-configuration`);
}

View File

@ -84,7 +84,7 @@ class HomePage extends React.Component {
{
items.map(item => {
return (
<SingleCard logo={item.logo} link={item.link} title={item.name} desc={item.organizer} isSingle={items.length === 1} />
<SingleCard key={item.link} logo={item.logo} link={item.link} title={item.name} desc={item.organizer} isSingle={items.length === 1} />
);
})
}

View File

@ -30,7 +30,7 @@ class AffiliationSelect extends React.Component {
};
}
componentWillMount() {
UNSAFE_componentWillMount() {
this.getAddressOptions(this.props.application);
this.getAffiliationOptions(this.props.application, this.props.user);
}

View File

@ -30,7 +30,7 @@ class OAuthWidget extends React.Component {
};
}
componentWillMount() {
UNSAFE_componentWillMount() {
this.getAddressOptions(this.props.application);
this.getAffiliationOptions(this.props.application, this.props.user);
}