From ee5fe21688c85dd941434bc5da30272375c911ad Mon Sep 17 00:00:00 2001 From: Shemy Gan Date: Wed, 16 Oct 2024 09:52:59 -0400 Subject: [PATCH] - Change to use more verbose names and fixed lint error in typo --- Client/src/Components/Dialog/index.jsx | 2 +- Client/src/Pages/Settings/index.jsx | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Client/src/Components/Dialog/index.jsx b/Client/src/Components/Dialog/index.jsx index 0e3bdad54..389d3a6e8 100644 --- a/Client/src/Components/Dialog/index.jsx +++ b/Client/src/Components/Dialog/index.jsx @@ -62,7 +62,7 @@ const Dialog = ({ modelTitle, modelDescription, } -Dialog.PropTypes = { +Dialog.propTypes = { modelTitle: PropTypes.string.isRequired, modelDescription: PropTypes.string.isRequired, open: PropTypes.bool.isRequired, diff --git a/Client/src/Pages/Settings/index.jsx b/Client/src/Pages/Settings/index.jsx index 67bca8db0..e3dba341d 100644 --- a/Client/src/Pages/Settings/index.jsx +++ b/Client/src/Pages/Settings/index.jsx @@ -39,8 +39,8 @@ const Settings = ({ isAdmin }) => { ttl: checkTTL ? (checkTTL / SECONDS_PER_DAY).toString() : 0, }); const [errors, setErrors] = useState({}); - const delStatMntrInitState = { delMntrs: false, delSts: false }; - const [isOpen, setIsOpen] = useState(delStatMntrInitState); + const deleteStatsMonitorsInitState = { deleteMonitors: false, deleteStats: false }; + const [isOpen, setIsOpen] = useState(deleteStatsMonitorsInitState); const dispatch = useDispatch(); const navigate = useNavigate(); @@ -123,7 +123,7 @@ const Settings = ({ isAdmin }) => { logger.error(error); createToast({ body: "Failed to clear stats" }); } finally { - setIsOpen(delStatMntrInitState) + setIsOpen(deleteStatsMonitorsInitState) } }; @@ -153,7 +153,7 @@ const Settings = ({ isAdmin }) => { logger.error(error); createToast({ Body: "Failed to delete all monitors" }); } finally { - setIsOpen(delStatMntrInitState) + setIsOpen(deleteStatsMonitorsInitState) } }; @@ -233,7 +233,7 @@ const Settings = ({ isAdmin }) => {