GroupMembershipRequests: don't clear dismissed entries until new content is fetched

This commit is contained in:
Alex Gleason 2023-03-22 16:42:08 -05:00
parent b47cdb368f
commit 1eed61c386
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import React from 'react';
import React, { useMemo } from 'react';
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
import Account from 'soapbox/components/account';
@ -56,7 +56,16 @@ const GroupMembershipRequests: React.FC<IGroupMembershipRequests> = ({ params })
const intl = useIntl();
const { group } = useGroup(id);
const { accounts, isLoading, authorize, reject } = useGroupMembershipRequests(id);
const {
accounts: entities,
isLoading,
authorize,
reject,
isFetching,
} = useGroupMembershipRequests(id);
const accounts = useMemo(() => entities, [isFetching]);
if (!group || !group.relationship || isLoading) {
return (