From 63c09a879f6e59b14199c38cb2376ea3882ddf03 Mon Sep 17 00:00:00 2001 From: Yixiang Zhao Date: Fri, 17 Jun 2022 19:57:11 +0800 Subject: [PATCH] fix: disable jsx-a11y/anchor-is-valid (#800) * fix: disable jsx-a11y/anchor-is-valid Signed-off-by: Yixiang Zhao * Update LoginPage.js * Update SignupPage.js Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com> --- web/src/auth/LoginPage.js | 10 ++++++---- web/src/auth/SignupPage.js | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index 6884951f..ecf4b78e 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -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 ( - + {provider.displayName} ) @@ -476,7 +478,7 @@ class LoginPage extends React.Component { {i18next.t("login:Auto sign in")} - { + { Setting.goToForget(this, application); }}> {i18next.t("login:Forgot password?")} @@ -555,7 +557,7 @@ class LoginPage extends React.Component { { !application.enableCodeSignin ? null : ( - { + { this.setState({ isCodeSignin: !this.state.isCodeSignin, }); @@ -567,7 +569,7 @@ class LoginPage extends React.Component { {i18next.t("login:No account?")}  - { + { sessionStorage.setItem("loginURL", window.location.href) Setting.goToSignup(this, application); }}> diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index 422b164d..991b2970 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -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")}   {i18next.t("signup:Have account?")}  - { + { let linkInStorage = sessionStorage.getItem("loginURL") if(linkInStorage != null){ Setting.goToLink(linkInStorage)