import { Entity } from 'megalodon' import { Dispatch, HTMLAttributes, SetStateAction } from 'react' import emojify from '@/utils/emojify' import { Button } from 'flowbite-react' import { FormattedMessage } from 'react-intl' type Props = { status: Entity.Status spoilered: boolean setSpoilered: Dispatch> } & HTMLAttributes export default function Body(props: Props) { const { spoilered, setSpoilered } = props const spoiler = () => { if (props.status.spoiler_text.length > 0) { return (
) } else { return null } } return ( <> {spoiler()} {!spoilered && (
)} ) }