From b7c121e78ec13ca58de3bc4f511438541613f67f Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Wed, 24 May 2023 21:32:15 -0400 Subject: [PATCH] Revert inputProps things --- web/.eslintrc | 6 ++++++ web/src/components/Account.jsx | 5 ++++- web/src/components/App.jsx | 5 ++--- web/src/components/EmojiPicker.jsx | 8 ++++---- web/src/components/ErrorBoundary.jsx | 7 ++++--- web/src/components/PublishDialog.jsx | 22 +++++++++++----------- web/src/components/SubscriptionPopup.jsx | 2 ++ 7 files changed, 33 insertions(+), 22 deletions(-) diff --git a/web/.eslintrc b/web/.eslintrc index 52e2c6b0..adf66130 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 535ccbc7..82956e52 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) => { - +