From 30e4b7219ca5cd19fb14b0f6b027087049f9247c Mon Sep 17 00:00:00 2001 From: mozzy11 Date: Thu, 19 Sep 2024 15:39:45 +0300 Subject: [PATCH] minor fix --- .../TestNotificationConfigEdit.js | 10 ++++------ .../TestNotificationConfigMenu.js | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigEdit.js b/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigEdit.js index 13d706083..f61a05a65 100644 --- a/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigEdit.js +++ b/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigEdit.js @@ -104,19 +104,17 @@ function TestNotificationConfigEdit() { }, [testNotificationConfigEditData]); const handleMenuItems = (res) => { - if (!res) { - } else { + if (res) { setTestNotificationConfigEditData(res); - setLoading(false); } + setLoading(false); }; const handleTestNamesList = (res) => { - if (!res) { - } else { + if (res) { setTestNamesList(res); - setLoading(false); } + setLoading(false); }; useEffect(() => { diff --git a/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigMenu.js b/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigMenu.js index 0809aafae..0cad171f1 100644 --- a/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigMenu.js +++ b/frontend/src/components/admin/testNotificationConfigMenu/TestNotificationConfigMenu.js @@ -71,19 +71,17 @@ function TestNotificationConfigMenu() { const [testNamesMap, setTestNamesMap] = useState({}); const handleMenuItems = (res) => { - if (!res) { - } else { - setLoading(false); + if (res) { setTestNotificationConfigMenuData(res); } + setLoading(false); }; const handleTestNamesList = (res) => { - if (!res) { - } else { - setLoading(false); + if (res) { setTestNamesList(res); } + setLoading(false); }; useEffect(() => {