From f93a031ff83b8cb1ae4a0149171627e5430e66e9 Mon Sep 17 00:00:00 2001 From: Thuc Nguyen Duy Date: Wed, 26 Jul 2023 11:58:57 +0700 Subject: [PATCH] [issue-915] UI bugs on the NFT list screen (Android device) --- .../Home/NFT/Collection/NftCollectionItem.tsx | 28 ++++++++----------- src/screens/Home/NFT/Item/NftItem.tsx | 19 ++++++------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/src/screens/Home/NFT/Collection/NftCollectionItem.tsx b/src/screens/Home/NFT/Collection/NftCollectionItem.tsx index 7e39bf75c..26221ff5a 100644 --- a/src/screens/Home/NFT/Collection/NftCollectionItem.tsx +++ b/src/screens/Home/NFT/Collection/NftCollectionItem.tsx @@ -3,7 +3,7 @@ import ImagePreview from 'components/ImagePreview'; import React from 'react'; import { StyleProp, Text, TextStyle, TouchableOpacity, View, ViewStyle } from 'react-native'; import { ColorMap } from 'styles/color'; -import { FontMedium, FontSemiBold, sharedStyles } from 'styles/sharedStyles'; +import { FontMedium, FontSemiBold } from 'styles/sharedStyles'; interface Props { nftCollection: NftCollection; @@ -12,15 +12,14 @@ interface Props { const WrapperStyle: StyleProp = { width: '50%', + height: 220, paddingHorizontal: 8, }; const ContainerStyle: StyleProp = { - display: 'flex', - flexDirection: 'column', - position: 'relative', + flex: 1, + justifyContent: 'space-between', borderRadius: 8, - overflow: 'hidden', backgroundColor: ColorMap.dark2, }; @@ -30,31 +29,28 @@ const LogoStyle: StyleProp = { }; const InfoStyle: StyleProp = { - display: 'flex', justifyContent: 'space-between', - position: 'relative', flexDirection: 'row', - alignItems: 'center', + alignItems: 'flex-end', width: '100%', - flex: 1, - marginTop: 10, - marginBottom: 16, + marginTop: 5, + paddingBottom: 16, paddingHorizontal: 12, }; const NameStyle: StyleProp = { - ...sharedStyles.mediumText, ...FontSemiBold, - fontSize: 18, - width: '80%', + fontSize: 14, + lineHeight: 22, + flex: 1, + marginRight: 2, color: ColorMap.light, }; const CountStyle: StyleProp = { - ...sharedStyles.mainText, ...FontMedium, textAlign: 'right', - width: '20%', + paddingLeft: 2, color: ColorMap.disabled, }; diff --git a/src/screens/Home/NFT/Item/NftItem.tsx b/src/screens/Home/NFT/Item/NftItem.tsx index 2a355c8ae..574586041 100644 --- a/src/screens/Home/NFT/Item/NftItem.tsx +++ b/src/screens/Home/NFT/Item/NftItem.tsx @@ -3,7 +3,7 @@ import React, { useMemo } from 'react'; import { StyleProp, Text, TouchableOpacity, View, ViewStyle } from 'react-native'; import ImagePreview from 'components/ImagePreview'; import { ColorMap } from 'styles/color'; -import { FontSemiBold, sharedStyles } from 'styles/sharedStyles'; +import { FontSemiBold } from 'styles/sharedStyles'; interface Props { nftItem: _NftItem; @@ -13,15 +13,14 @@ interface Props { const WrapperStyle: StyleProp = { width: '50%', + height: 220, paddingHorizontal: 8, }; const ContainerStyle: StyleProp = { - display: 'flex', - flexDirection: 'column', - position: 'relative', + flex: 1, + justifyContent: 'space-between', borderRadius: 8, - overflow: 'hidden', backgroundColor: ColorMap.dark2, }; @@ -31,21 +30,19 @@ const LogoStyle: StyleProp = { }; const InfoStyle: StyleProp = { - display: 'flex', justifyContent: 'space-between', - position: 'relative', flexDirection: 'row', alignItems: 'center', width: '100%', - flex: 1, - marginTop: 10, - marginBottom: 16, + marginTop: 5, + paddingBottom: 16, paddingHorizontal: 12, }; const NameStyle: StyleProp = { - ...sharedStyles.mediumText, ...FontSemiBold, + fontSize: 14, + lineHeight: 22, width: '100%', color: ColorMap.light, };