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

View File

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