UnapprovedAccount: use the regular Account component
This commit is contained in:
parent
ac75e10d39
commit
2c6a5fe1a7
|
@ -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>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ const AccountAuthorize: React.FC<IAccountAuthorize> = ({ id }) => {
|
||||||
<AuthorizeRejectButtons
|
<AuthorizeRejectButtons
|
||||||
onAuthorize={onAuthorize}
|
onAuthorize={onAuthorize}
|
||||||
onReject={onReject}
|
onReject={onReject}
|
||||||
countdown={3000}
|
countdown={1000}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue