import { Avatar } from 'flowbite-react' import { Entity, MegalodonInterface } from 'megalodon' import dayjs from 'dayjs' import Body from './Body' import Media from './Media' import emojify from '@/utils/emojify' import Card from './Card' type Props = { status: Entity.Status client: MegalodonInterface } export default function Status(props: Props) { const status = originalStatus(props.status) return (
{rebloggedHeader(props.status)}
@{status.account.acct}
{status.card && }
) } const originalStatus = (status: Entity.Status) => { if (status.reblog && !status.quote) { return status.reblog } else { return status } } const rebloggedHeader = (status: Entity.Status) => { if (status.reblog && !status.quote) { return (
{status.account.username} boosted
) } else { return null } }