import { Entity } from 'megalodon' import { useState } from 'react' import { Blurhash } from 'react-blurhash' import { FaEyeSlash } from 'react-icons/fa6' import { FormattedMessage } from 'react-intl' type Props = { media: Array sensitive: boolean } export default function Media(props: Props) { const [sensitive, setSensitive] = useState(props.sensitive) return (
{sensitive ? ( ) : ( )}
{props.media.map((media, key) => (
))}
) } type AttachmentProps = { attachment: Entity.Attachment sensitive: boolean } function Attachment(props: AttachmentProps) { if (props.sensitive) { return ( ) } else { return ( {props.attachment.description} ) } }