diff --git a/web/.eslintrc b/web/.eslintrc index 52e2c6b..adf6613 100644 --- a/web/.eslintrc +++ b/web/.eslintrc @@ -20,6 +20,12 @@ "react/destructuring-assignment": "off", "react/jsx-no-useless-fragment": "off", "react/jsx-props-no-spreading": "off", + "react/jsx-no-duplicate-props": [ + "error", + { + "ignoreCase": false // For 's [iI]nputProps + } + ], "react/function-component-definition": [ "error", { diff --git a/web/src/components/Account.jsx b/web/src/components/Account.jsx index 535ccbc..82956e5 100644 --- a/web/src/components/Account.jsx +++ b/web/src/components/Account.jsx @@ -994,6 +994,7 @@ const TokenDialog = (props) => { const TokenDeleteDialog = (props) => { const { t } = useTranslation(); + const [error, setError] = useState(""); const handleSubmit = async () => { try { @@ -1003,6 +1004,8 @@ const TokenDeleteDialog = (props) => { console.log(`[Account] Error deleting token`, e); if (e instanceof UnauthorizedError) { session.resetAndRedirect(routes.login); + } else { + setError(e.message); } } }; @@ -1015,7 +1018,7 @@ const TokenDeleteDialog = (props) => { - +