import useTranslation from 'next-translate/useTranslation' import { useAuthentication } from '../../../../../tools/authentication' import { Emoji } from '../../../../Emoji' import type { MessageProps } from '../Message' interface MessageOptionsProps extends MessageProps { handleEdit: () => void editMode: ':white_check_mark:' | ':pencil2:' } export const MessageOptions: React.FC< React.PropsWithChildren > = ({ handleEdit, editMode, message }) => { const { t } = useTranslation() const { authentication } = useAuthentication() const handleDeleteMessage = async (): Promise => { try { await authentication.api.delete(`/messages/${message.id}`) } catch {} } return (
{message.type === 'text' && (
)}
) }