Remove use of flatten where possible (#9325)

* remove use of flatten where possible

* restore flatten where it says it's needed

* missing utils alpha
This commit is contained in:
Samuel Newman
2025-11-04 15:43:08 +02:00
committed by GitHub
parent 0bcde99025
commit 1b0fbd503e
28 changed files with 67 additions and 97 deletions
+3 -7
View File
@@ -48,18 +48,14 @@ export function RichText({
[value],
)
const flattenedStyle = flatten(style)
const plainStyles = [a.leading_snug, flattenedStyle]
const interactiveStyles = [
a.leading_snug,
flatten(interactiveStyle),
flattenedStyle,
]
const plainStyles = [a.leading_snug, style]
const interactiveStyles = [plainStyles, interactiveStyle]
const {text, facets} = richText
if (!facets?.length) {
if (isOnlyEmoji(text)) {
const flattenedStyle = flatten(style)
const fontSize =
(flattenedStyle.fontSize ?? a.text_sm.fontSize) * emojiMultiplier
return (