From 4263af6f2ccc71df57eab8a84e1e327ee3071244 Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Mon, 25 Apr 2022 20:00:57 +0800 Subject: [PATCH] Fix frontend warnings. --- web/src/CropperDiv.js | 1 - web/src/TokenListPage.js | 1 - web/src/UserListPage.js | 1 - web/src/auth/LoginPage.js | 5 ++++- web/src/common/CountDownInput.js | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/src/CropperDiv.js b/web/src/CropperDiv.js index 69ea9522..70f1d537 100644 --- a/web/src/CropperDiv.js +++ b/web/src/CropperDiv.js @@ -27,7 +27,6 @@ export const CropperDiv = (props) => { const [confirmLoading, setConfirmLoading] = React.useState(false); const {title} = props; const {user} = props; - const {account} = props; const {buttonText} = props; let uploadButton; diff --git a/web/src/TokenListPage.js b/web/src/TokenListPage.js index 8abf6b0d..4da920ef 100644 --- a/web/src/TokenListPage.js +++ b/web/src/TokenListPage.js @@ -19,7 +19,6 @@ import moment from "moment"; import * as Setting from "./Setting"; import * as TokenBackend from "./backend/TokenBackend"; import i18next from "i18next"; -import * as ResourceBackend from "./backend/ResourceBackend"; import BaseListPage from "./BaseListPage"; class TokenListPage extends BaseListPage { diff --git a/web/src/UserListPage.js b/web/src/UserListPage.js index 05ce0ed1..e93f9e2e 100644 --- a/web/src/UserListPage.js +++ b/web/src/UserListPage.js @@ -21,7 +21,6 @@ import * as Setting from "./Setting"; import * as UserBackend from "./backend/UserBackend"; import i18next from "i18next"; import BaseListPage from "./BaseListPage"; -import * as path from "path"; class UserListPage extends BaseListPage { constructor(props) { diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index d749c0f6..afcb801b 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -149,7 +149,7 @@ class LoginPage extends React.Component { AuthBackend.loginCas(values, casParams).then((res) => { if (res.status === 'ok') { let msg = "Logged in successfully. " - if (casParams.service == "") { + if (casParams.service === "") { //If service was not specified, CAS MUST display a message notifying the client that it has successfully initiated a single sign-on session. msg += "Now you can visit apps protected by casdoor." } @@ -593,6 +593,9 @@ class LoginPage extends React.Component { return (
+ {/*{*/} + {/* JSON.stringify(silentSignin)*/} + {/*}*/}
{i18next.t("login:Continue with")} :
diff --git a/web/src/common/CountDownInput.js b/web/src/common/CountDownInput.js index 68844998..c438a097 100644 --- a/web/src/common/CountDownInput.js +++ b/web/src/common/CountDownInput.js @@ -18,8 +18,6 @@ import * as Setting from "../Setting"; import i18next from "i18next"; import * as UserBackend from "../backend/UserBackend"; import {SafetyOutlined} from "@ant-design/icons"; -import * as Util from "../auth/Util"; -import {isValidEmail, isValidPhone} from "../Setting"; const { Search } = Input;