simplify
This commit is contained in:
@@ -214,32 +214,25 @@ function LandingScreenInner({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function User({displayName, avatar}: {displayName: string; avatar?: string}) {
|
|
||||||
const {isTabletOrDesktop} = useWebMediaQueries()
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style={[a.flex_1, a.align_center, a.gap_sm]}>
|
|
||||||
<UserAvatar size={isTabletOrDesktop ? 58 : 48} avatar={avatar} />
|
|
||||||
<Text style={[a.flex_1, a.text_sm, a.font_bold]} numberOfLines={1}>
|
|
||||||
{displayName}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function ProfilesSet({
|
function ProfilesSet({
|
||||||
profiles,
|
profiles,
|
||||||
}: {
|
}: {
|
||||||
profiles: AppBskyActorDefs.ProfileViewBasic[]
|
profiles: AppBskyActorDefs.ProfileViewBasic[]
|
||||||
}) {
|
}) {
|
||||||
|
const {isTabletOrDesktop} = useWebMediaQueries()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[a.flex_row, a.gap_xs, a.align_center, a.justify_between]}>
|
<View style={[a.flex_row, a.gap_xs, a.align_center, a.justify_between]}>
|
||||||
{profiles.map(profile => (
|
{profiles.map(profile => (
|
||||||
<User
|
<View style={[a.flex_1, a.align_center, a.gap_sm]} key={profile.did}>
|
||||||
key={profile.did}
|
<UserAvatar
|
||||||
displayName={profile.displayName || `@${profile.handle}`}
|
size={isTabletOrDesktop ? 58 : 48}
|
||||||
avatar={profile.avatar}
|
avatar={profile.avatar}
|
||||||
/>
|
/>
|
||||||
|
<Text style={[a.flex_1, a.text_sm, a.font_bold]} numberOfLines={1}>
|
||||||
|
{profile.displayName}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user