From 522581af7508d0bfa33540acd42246aaac852c51 Mon Sep 17 00:00:00 2001 From: nicholas-codecov Date: Mon, 23 Dec 2024 07:36:44 -0400 Subject: [PATCH] remove spread operation --- .../AdminMembers/MemberList/MemberTable.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx index 0479870c53..1ef7a86cb1 100644 --- a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx +++ b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx @@ -100,9 +100,13 @@ interface Params { } const useQueryMembersList = (params: Params) => { - const { data: queryData, ...rest } = useInfiniteQueryV5( - SelfHostedUserListQueryOpts(params) - ) + const { + data: queryData, + isFetchingNextPage, + hasNextPage, + fetchNextPage, + isLoading, + } = useInfiniteQueryV5(SelfHostedUserListQueryOpts(params)) const flatUsersList = useMemo( () => queryData?.pages?.flatMap((page) => page.results) ?? [], @@ -110,8 +114,11 @@ const useQueryMembersList = (params: Params) => { ) return { - ...rest, data: flatUsersList, + isFetchingNextPage, + hasNextPage, + fetchNextPage, + isLoading, } }