import { Entity } from 'megalodon' import { FaUserPlus } from 'react-icons/fa6' import { FormattedMessage, useIntl } from 'react-intl' import emojify from '@/utils/emojify' import { Avatar } from '@material-tailwind/react' import { useRouter } from 'next/router' type Props = { notification: Entity.Notification } export default function Follow(props: Props) { const { formatMessage } = useIntl() const router = useRouter() const openUser = (id: string) => { router.push({ query: { id: router.query.id, timeline: router.query.timeline, user_id: id, detail: true } }) } return (
openUser(props.notification.account.id)} >
openUser(props.notification.account.id)} variant="rounded" style={{ width: '40px', height: '40px' }} alt={formatMessage({ id: 'timeline.status.avatar' }, { user: props.notification.account.username })} />
openUser(props.notification.account.id)}> @{props.notification.account.acct}
) } const actionId = (notification: Entity.Notification) => { if (notification.type === 'follow_request') { return 'notification.follow_request.body' } else { return 'notification.follow.body' } }