mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 11:44:28 +08:00
fix: handle empty block content in MessageTranslate component
This commit is contained in:
parent
058c1e9de7
commit
cc9b301fd4
@ -14,16 +14,12 @@ interface Props {
|
||||
const MessageTranslate: FC<Props> = ({ block }) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
if (!block.content) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<Divider style={{ margin: 0, marginBottom: 10 }}>
|
||||
<TranslationOutlined />
|
||||
</Divider>
|
||||
{block.content === t('translate.processing') ? (
|
||||
{!block.content || block.content === t('translate.processing') ? (
|
||||
<SvgSpinners180Ring color="var(--color-text-2)" style={{ marginBottom: 15 }} />
|
||||
) : (
|
||||
<Markdown block={block} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user