diff options
author | Eric Bailey <git@esb.lol> | 2024-09-23 10:40:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 00:40:37 +0900 |
commit | 5eb294488f08534abac3335acfa366cffea9259e (patch) | |
tree | 94453e05d751b5b2ef91467460c258ed5e00b80d /src/components/LabelingServiceCard | |
parent | 443f3a64069f081764c2f49578108a9570e8e834 (diff) | |
download | voidsky-5eb294488f08534abac3335acfa366cffea9259e.tar.zst |
[Neue] Handle emoji within custom font (#5449)
* Support emoji in text with custom font * Add emoji support to elements that need it * Remove unused file causing lint failure * Fix a few more emoji locations * Couple more * No throw
Diffstat (limited to 'src/components/LabelingServiceCard')
-rw-r--r-- | src/components/LabelingServiceCard/index.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/LabelingServiceCard/index.tsx b/src/components/LabelingServiceCard/index.tsx index 851645a48..03b8ece6b 100644 --- a/src/components/LabelingServiceCard/index.tsx +++ b/src/components/LabelingServiceCard/index.tsx @@ -44,17 +44,22 @@ export function Avatar({avatar}: {avatar?: string}) { } export function Title({value}: {value: string}) { - return <Text style={[a.text_md, a.font_bold, a.leading_tight]}>{value}</Text> + return ( + <Text emoji style={[a.text_md, a.font_bold, a.leading_tight]}> + {value} + </Text> + ) } export function Description({value, handle}: {value?: string; handle: string}) { + const {_} = useLingui() return value ? ( <Text numberOfLines={2}> <RichText value={value} style={[a.leading_snug]} /> </Text> ) : ( - <Text style={[a.leading_snug]}> - <Trans>By {sanitizeHandle(handle, '@')}</Trans> + <Text emoji style={[a.leading_snug]}> + {_(msg`By ${sanitizeHandle(handle, '@')}`)} </Text> ) } |