refactor(business): simplify text rendering in PostContentRenderer
Remove redundant `<Text>` wrapper when keyword highlighting is not applied to improve rendering efficiency and consistency.
This commit is contained in:
@@ -162,7 +162,7 @@ const PostContentRenderer: React.FC<PostContentRendererProps> = ({
|
|||||||
return highlightKeyword ? (
|
return highlightKeyword ? (
|
||||||
<HighlightText key={segKey} text={text} keyword={highlightKeyword} style={highlightStyle} />
|
<HighlightText key={segKey} text={text} keyword={highlightKeyword} style={highlightStyle} />
|
||||||
) : (
|
) : (
|
||||||
<Text key={segKey}>{text}</Text>
|
text
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case 'at': {
|
case 'at': {
|
||||||
|
|||||||
Reference in New Issue
Block a user