UnapprovedAccount: use the regular Account component

This commit is contained in:
Alex Gleason 2024-06-06 17:51:37 -05:00
parent ac75e10d39
commit 2c6a5fe1a7
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 10 additions and 16 deletions

View File

@ -2,8 +2,8 @@ import React from 'react';
import { approveUsers, deleteUsers } from 'soapbox/actions/admin';
import { useAccount } from 'soapbox/api/hooks';
import Account from 'soapbox/components/account';
import { AuthorizeRejectButtons } from 'soapbox/components/authorize-reject-buttons';
import { Stack, HStack, Text } from 'soapbox/components/ui';
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
interface IUnapprovedAccount {
@ -23,24 +23,18 @@ const UnapprovedAccount: React.FC<IUnapprovedAccount> = ({ accountId }) => {
const handleReject = () => dispatch(deleteUsers([account.id]));
return (
<HStack space={4} justifyContent='between'>
<Stack space={1}>
<Text weight='semibold'>
@{account.acct}
</Text>
<Text tag='blockquote' size='sm'>
{adminAccount?.invite_request || ''}
</Text>
</Stack>
<Stack justifyContent='center'>
<Account
key={account.id}
account={account}
note={adminAccount?.invite_request || ''}
action={(
<AuthorizeRejectButtons
onAuthorize={handleApprove}
onReject={handleReject}
countdown={3000}
countdown={1000}
/>
</Stack>
</HStack>
)}
/>
);
};

View File

@ -27,7 +27,7 @@ const AccountAuthorize: React.FC<IAccountAuthorize> = ({ id }) => {
<AuthorizeRejectButtons
onAuthorize={onAuthorize}
onReject={onReject}
countdown={3000}
countdown={1000}
/>
}
/>