improve some wording

This commit is contained in:
Hailey
2024-06-16 01:20:11 -07:00
parent 06b64b65b6
commit 0b79551bf8
@@ -1,10 +1,6 @@
import React from 'react' import React from 'react'
import {ScrollView, View} from 'react-native' import {ScrollView, View} from 'react-native'
import { import {AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api'
AppBskyActorDefs,
AppBskyGraphDefs,
AppBskyGraphStarterpack,
} from '@atproto/api'
import {msg, Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@@ -16,7 +12,7 @@ import {
import {useResolveDidQuery} from 'state/queries/resolve-uri' import {useResolveDidQuery} from 'state/queries/resolve-uri'
import {useStarterPackQuery} from 'state/queries/useStarterPackQuery' import {useStarterPackQuery} from 'state/queries/useStarterPackQuery'
import {LoggedOutScreenState} from 'view/com/auth/LoggedOut' import {LoggedOutScreenState} from 'view/com/auth/LoggedOut'
import {UserAvatar} from 'view/com/util/UserAvatar' import {ProfileCard} from 'view/com/profile/ProfileCard'
import {CenteredView} from 'view/com/util/Views' import {CenteredView} from 'view/com/util/Views'
import {Logo} from 'view/icons/Logo' import {Logo} from 'view/icons/Logo'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
@@ -96,11 +92,8 @@ function LandingScreenInner({
const usedStarterPack = useUsedStarterPack() const usedStarterPack = useUsedStarterPack()
const {isTabletOrDesktop} = useWebMediaQueries() const {isTabletOrDesktop} = useWebMediaQueries()
const listItemsCount = starterPack.list?.listItemCount ?? 0
const sampleProfiles = listItemsSample?.map(item => item.subject) const sampleProfiles = listItemsSample?.map(item => item.subject)
const userSets = {
first: sampleProfiles?.slice(0, 4),
second: sampleProfiles?.slice(4, 8),
}
if (!AppBskyGraphStarterpack.isRecord(record)) { if (!AppBskyGraphStarterpack.isRecord(record)) {
return null return null
@@ -149,7 +142,7 @@ function LandingScreenInner({
</Text> </Text>
) : null} ) : null}
<Button <Button
label={_(msg`Join now!`)} label={_(msg`Join the conversation now!`)}
onPress={() => { onPress={() => {
setUsedStarterPack({ setUsedStarterPack({
uri: starterPack.uri, uri: starterPack.uri,
@@ -161,7 +154,7 @@ function LandingScreenInner({
color="primary" color="primary"
size="large"> size="large">
<ButtonText style={[a.text_lg]}> <ButtonText style={[a.text_lg]}>
<Trans>Join now!</Trans> <Trans>Join the conversation now!</Trans>
</ButtonText> </ButtonText>
</Button> </Button>
{joinedWeekCount && joinedWeekCount >= 25 ? ( {joinedWeekCount && joinedWeekCount >= 25 ? (
@@ -208,11 +201,30 @@ function LandingScreenInner({
<View style={[a.gap_md]}> <View style={[a.gap_md]}>
<Text style={[a.font_bold, a.text_lg]}> <Text style={[a.font_bold, a.text_lg]}>
{feeds?.length ? ( {feeds?.length ? (
<Trans>Also follow these people and many others!</Trans> <>
{listItemsCount <= 8 ? (
<Trans>Also follow these people right away!</Trans>
) : (
<Trans>
Also follow these people and {listItemsCount - 8}{' '}
others!
</Trans>
)}
</>
) : ( ) : (
<Trans> <>
Get started by following these people and many others! {listItemsCount <= 8 ? (
</Trans> <Trans>
Get started by following these people right away!
</Trans>
) : (
<Trans>
Get started by following these people and{' '}
{listItemsCount - 8}
others!
</Trans>
)}
</>
)} )}
</Text> </Text>
<View <View
@@ -223,12 +235,12 @@ function LandingScreenInner({
a.py_md, a.py_md,
a.gap_xl, a.gap_xl,
]}> ]}>
{userSets.first?.length ? ( {starterPack.listItemsSample?.map(item => (
<ProfilesSet profiles={userSets.first} /> <ProfileCard
) : null} profile={item.subject}
{userSets.second?.length ? ( key={item.subject.did}
<ProfilesSet profiles={userSets.second} /> />
) : null} ))}
</View> </View>
</View> </View>
)} )}
@@ -238,27 +250,3 @@ function LandingScreenInner({
</CenteredView> </CenteredView>
) )
} }
function ProfilesSet({
profiles,
}: {
profiles: AppBskyActorDefs.ProfileViewBasic[]
}) {
const {isTabletOrDesktop} = useWebMediaQueries()
return (
<View style={[a.flex_row, a.gap_xs, a.align_center, a.justify_between]}>
{profiles.map(profile => (
<View style={[a.flex_1, a.align_center, a.gap_sm]} key={profile.did}>
<UserAvatar
size={isTabletOrDesktop ? 58 : 48}
avatar={profile.avatar}
/>
<Text style={[a.flex_1, a.text_sm, a.font_bold]} numberOfLines={1}>
{profile.displayName}
</Text>
</View>
))}
</View>
)
}