From 412a0489d6f1632d26c35abf91f2fe9679c7fe35 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 23 Jul 2024 16:10:49 -0500 Subject: [PATCH] Improve translation output --- src/components/dialogs/MutedWords.tsx | 36 ++++++++++++++++----------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/components/dialogs/MutedWords.tsx b/src/components/dialogs/MutedWords.tsx index 8db437c6e2..dca2515bcf 100644 --- a/src/components/dialogs/MutedWords.tsx +++ b/src/components/dialogs/MutedWords.tsx @@ -417,11 +417,6 @@ function MutedWordRow({ const control = Prompt.usePromptControl() const expiryDate = word.expiresAt ? new Date(word.expiresAt) : undefined const isExpired = expiryDate && expiryDate < new Date() - const target = word.targets.find(t => t === 'content') ? ( - text, tags - ) : ( - tags - ) const formatDistance = useFormatDistance() const remove = React.useCallback(async () => { @@ -464,16 +459,27 @@ function MutedWordRow({ wordBreak: 'break-word', }), ]}> - {word.value} - - - {' '} - in{' '} - - - - {target} - + {word.targets.find(t => t === 'content') ? ( + + {word.value}{' '} + + in{' '} + + text, tags + + + + ) : ( + + {word.value}{' '} + + in{' '} + + tags + + + + )}