Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spacing to 28px in latest TestFlight version #6351

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/components/Discover/TrendingTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function FriendHolders({ friends }: { friends: FarcasterUser[] }) {
const separator = howManyOthers === 1 && friends.length === 2 ? ` ${i18n.t(t.and)} ` : ', ';

return (
<View style={{ flexDirection: 'row', gap: 5.67, alignItems: 'center', marginTop: -2 }}>
<View style={{ flexDirection: 'row', gap: 5.67, height: 12, alignItems: 'center' }}>
<View style={{ flexDirection: 'row-reverse', alignItems: 'center', paddingLeft: 6 }}>
<FriendPfp pfp_url={friends[0].pfp_url} />
{friends[1] && <FriendPfp pfp_url={friends[1].pfp_url} />}
Expand Down Expand Up @@ -377,7 +377,7 @@ function TrendingTokenRow({ token }: { token: TrendingToken }) {

return (
<ButtonPressAnimation onPress={handleNavigateToToken} scaleTo={0.94}>
<View style={{ paddingVertical: 12, flexDirection: 'row', gap: 12, alignItems: 'center' }}>
<View style={{ height: 48, overflow: 'visible', flexDirection: 'row', gap: 12, alignItems: 'center' }}>
<SwapCoinIcon
iconUrl={token.icon_url}
color={token.colors.primary}
Expand All @@ -388,7 +388,7 @@ function TrendingTokenRow({ token }: { token: TrendingToken }) {
chainSize={20}
/>

<View style={{ gap: 12, flex: 1 }}>
<View style={{ gap: 10, flex: 1 }}>
walmat marked this conversation as resolved.
Show resolved Hide resolved
<FriendHolders friends={token.highlightedFriends} />

<View style={{ flexDirection: 'row', gap: 12, alignItems: 'center' }}>
Expand All @@ -397,6 +397,7 @@ function TrendingTokenRow({ token }: { token: TrendingToken }) {
style={{
flexDirection: 'row',
gap: 6,
height: 10,
alignItems: 'baseline',
maxWidth:
Dimensions.get('screen').width -
Expand All @@ -416,7 +417,7 @@ function TrendingTokenRow({ token }: { token: TrendingToken }) {
</Text>
</View>

<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
<View style={{ flexDirection: 'row', gap: 8, height: 7, alignItems: 'center' }}>
<View style={{ flexDirection: 'row', gap: 4 }}>
<Text color="labelQuaternary" size="11pt" weight="bold">
VOL
Expand Down Expand Up @@ -590,17 +591,18 @@ function TrendingTokenData() {

return (
<FlatList
style={{ marginHorizontal: -20 }}
contentContainerStyle={{ paddingHorizontal: 20 }}
style={{ marginHorizontal: -20, paddingVertical: 12, marginVertical: -12 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just to expand the list's touchable area?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah adds a little padding on the top/bottom of the list

contentContainerStyle={{ paddingHorizontal: 20, gap: 28 }}
ListEmptyComponent={<NoResults />}
data={trendingTokens}
renderItem={({ item }) => <TrendingTokenRow token={item} />}
/>
);
}

const padding = 20;

export function TrendingTokens() {
const padding = 20;
return (
<View style={{ gap: 28 }}>
<View style={{ gap: 12, justifyContent: 'center' }}>
Expand Down
Loading