From 9b4ece6d1f69e290b825ed546c64a52614fb1846 Mon Sep 17 00:00:00 2001 From: Shanting Hou Date: Thu, 5 Dec 2024 16:40:48 -0500 Subject: [PATCH] fix membership group lint --- admin/src/Membership/MemberBoxGroups.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/admin/src/Membership/MemberBoxGroups.js b/admin/src/Membership/MemberBoxGroups.js index 04475e3d..187a3d2d 100644 --- a/admin/src/Membership/MemberBoxGroups.js +++ b/admin/src/Membership/MemberBoxGroups.js @@ -26,17 +26,8 @@ function MemberBoxGroups(props) { const [showOptions, setShowOptions] = useState([]); const [selectedOption, setSelectedOption] = useState(null); - // Define the `get` function for making GET requests - const get = async ({ url }) => { - const response = await fetch(url); - if (!response.ok) { - throw new Error("Failed to fetch data"); - } - const data = await response.json(); - return { data }; - }; - useEffect(() => { + // eslint-disable-next-line no-undef get({ url: "/membership/group" }).then((data) => { const updatedOptions = data.data; setOptions(updatedOptions);