import emojify from '@/utils/emojify' import { Avatar } from '@material-tailwind/react' import { Entity, MegalodonInterface } from 'megalodon' import { useRouter } from 'next/router' import { FaCheck, FaXmark } from 'react-icons/fa6' import { useIntl } from 'react-intl' type Props = { user: Entity.Account | Entity.FollowRequest client: MegalodonInterface refresh: () => Promise } export default function User(props: Props) { const router = useRouter() const { formatMessage } = useIntl() const openUser = (id: string) => { router.push({ query: { id: router.query.id, timeline: router.query.timeline, user_id: id, detail: true } }) } const authorize = async () => { await props.client.acceptFollowRequest(`${props.user.id}`) await props.refresh() } const reject = async () => { await props.client.rejectFollowRequest(`${props.user.id}`) await props.refresh() } return (
openUser(`${props.user.id}`)}>

@{props.user.acct}

) }