This commit is contained in:
Hailey
2024-06-12 12:04:52 -07:00
parent d28b4ad20e
commit a836e81dc7
+11 -18
View File
@@ -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>
) )