import React from 'react'; import { authorizeFollowRequest, rejectFollowRequest } from 'soapbox/actions/accounts'; import { useAccount } from 'soapbox/api/hooks'; import Account from 'soapbox/components/account'; import { AuthorizeRejectButtons } from 'soapbox/components/authorize-reject-buttons'; import { useAppDispatch } from 'soapbox/hooks'; interface IAccountAuthorize { id: string } const AccountAuthorize: React.FC = ({ id }) => { const dispatch = useAppDispatch(); const { account } = useAccount(id); const onAuthorize = () => dispatch(authorizeFollowRequest(id)); const onReject = () => dispatch(rejectFollowRequest(id)); if (!account) return null; return (
} />
); }; export default AccountAuthorize;