fix: disable jsx-a11y/anchor-is-valid (#800)

* fix: disable jsx-a11y/anchor-is-valid

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* Update LoginPage.js

* Update SignupPage.js

Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
This commit is contained in:
Yixiang Zhao
2022-06-17 19:57:11 +08:00
committed by GitHub
parent 61c80e790f
commit 63c09a879f
2 changed files with 9 additions and 5 deletions

View File

@ -49,6 +49,8 @@ import CustomGithubCorner from "../CustomGithubCorner";
import {CountDownInput} from "../common/CountDownInput";
import BilibiliLoginButton from "./BilibiliLoginButton";
/* eslint-disable jsx-a11y/anchor-is-valid */
class LoginPage extends React.Component {
constructor(props) {
super(props);
@ -320,7 +322,7 @@ class LoginPage extends React.Component {
)
} else if (provider.category === "SAML") {
return (
<a href="/#" key={provider.displayName} onClick={this.getSamlUrl.bind(this, provider)}>
<a key={provider.displayName} onClick={this.getSamlUrl.bind(this, provider)}>
<img width={width} height={width} src={Setting.getProviderLogoURL(provider)} alt={provider.displayName} style={{margin: margin}} />
</a>
)
@ -476,7 +478,7 @@ class LoginPage extends React.Component {
{i18next.t("login:Auto sign in")}
</Checkbox>
</Form.Item>
<a href="/#" style={{float: "right"}} onClick={() => {
<a style={{float: "right"}} onClick={() => {
Setting.goToForget(this, application);
}}>
{i18next.t("login:Forgot password?")}
@ -555,7 +557,7 @@ class LoginPage extends React.Component {
<span style={{float: "left"}}>
{
!application.enableCodeSignin ? null : (
<a href="/#" onClick={() => {
<a onClick={() => {
this.setState({
isCodeSignin: !this.state.isCodeSignin,
});
@ -567,7 +569,7 @@ class LoginPage extends React.Component {
</span>
<span style={{float: "right"}}>
{i18next.t("login:No account?")}&nbsp;
<a href="/#" onClick={() => {
<a onClick={() => {
sessionStorage.setItem("loginURL", window.location.href)
Setting.goToSignup(this, application);
}}>

View File

@ -25,6 +25,8 @@ import {CountDownInput} from "../common/CountDownInput";
import SelectRegionBox from "../SelectRegionBox";
import CustomGithubCorner from "../CustomGithubCorner";
/* eslint-disable jsx-a11y/anchor-is-valid */
const formItemLayout = {
labelCol: {
xs: {
@ -559,7 +561,7 @@ class SignupPage extends React.Component {
{i18next.t("account:Sign Up")}
</Button>
&nbsp;&nbsp;{i18next.t("signup:Have account?")}&nbsp;
<a href="/#" onClick={() => {
<a onClick={() => {
let linkInStorage = sessionStorage.getItem("loginURL")
if(linkInStorage != null){
Setting.goToLink(linkInStorage)