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/StarterPack/StarterPackCard.tsx | |
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/StarterPack/StarterPackCard.tsx')
-rw-r--r-- | src/components/StarterPack/StarterPackCard.tsx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/components/StarterPack/StarterPackCard.tsx b/src/components/StarterPack/StarterPackCard.tsx index 4c4bf246e..ead9c9248 100644 --- a/src/components/StarterPack/StarterPackCard.tsx +++ b/src/components/StarterPack/StarterPackCard.tsx @@ -2,15 +2,15 @@ import React from 'react' import {View} from 'react-native' import {Image} from 'expo-image' import {AppBskyGraphDefs, AppBskyGraphStarterpack, AtUri} from '@atproto/api' -import {msg, Trans} from '@lingui/macro' +import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useQueryClient} from '@tanstack/react-query' -import {sanitizeHandle} from 'lib/strings/handles' -import {getStarterPackOgCard} from 'lib/strings/starter-pack' -import {precacheResolvedUri} from 'state/queries/resolve-uri' -import {precacheStarterPack} from 'state/queries/starter-packs' -import {useSession} from 'state/session' +import {sanitizeHandle} from '#/lib/strings/handles' +import {getStarterPackOgCard} from '#/lib/strings/starter-pack' +import {precacheResolvedUri} from '#/state/queries/resolve-uri' +import {precacheStarterPack} from '#/state/queries/starter-packs' +import {useSession} from '#/state/session' import {atoms as a, useTheme} from '#/alf' import {StarterPack} from '#/components/icons/StarterPack' import {BaseLink} from '#/components/Link' @@ -66,21 +66,18 @@ export function Card({ <View style={[a.flex_row, a.gap_sm]}> {!noIcon ? <StarterPack width={40} gradient="sky" /> : null} <View> - <Text style={[a.text_md, a.font_bold, a.leading_snug]}> + <Text emoji style={[a.text_md, a.font_bold, a.leading_snug]}> {record.name} </Text> - <Text style={[a.leading_snug, t.atoms.text_contrast_medium]}> - <Trans> - Starter pack by{' '} - {creator?.did === currentAccount?.did - ? _(msg`you`) - : `@${sanitizeHandle(creator.handle)}`} - </Trans> + <Text emoji style={[a.leading_snug, t.atoms.text_contrast_medium]}> + {creator?.did === currentAccount?.did + ? _(msg`Starter pack by you`) + : _(msg`Starter pack by ${sanitizeHandle(creator.handle, '@')}`)} </Text> </View> </View> {!noDescription && record.description ? ( - <Text numberOfLines={3} style={[a.leading_snug]}> + <Text emoji numberOfLines={3} style={[a.leading_snug]}> {record.description} </Text> ) : null} |