fix(mobile): improve CJK character handling in FallbackIcon component
This commit is contained in:
parent
4119b9aece
commit
72ed7df9a8
|
|
@ -32,7 +32,8 @@ export const FallbackIcon = ({
|
|||
const [, , , bgAccent, bgAccentLight, bgAccentUltraLight] = colors
|
||||
|
||||
const renderedText = useMemo(() => {
|
||||
const isCJK = isCJKChar(title[0]!)
|
||||
const firstChar = title.at(0)
|
||||
const isCJK = firstChar ? isCJKChar(firstChar) : false
|
||||
return (
|
||||
<Text style={StyleSheet.flatten([styles.text, textStyle])} className={textClassName}>
|
||||
{isCJK ? title[0] : title.slice(0, 2)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue