Skip to content

Commit

Permalink
Merge pull request #20 from ilong4rennes/membership-group-fix
Browse files Browse the repository at this point in the history
fix membership group lint
  • Loading branch information
shantinghou authored Dec 5, 2024
2 parents 0d57538 + 9b4ece6 commit 9836d0a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions admin/src/Membership/MemberBoxGroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9836d0a

Please sign in to comment.