From 2c9b2cf69d6e2fba44bcecb2636f51c94b8a64dd Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 12 Mar 2021 14:57:12 -0500 Subject: fixed layout issue on smaller screens --- src/components/common/GradientBorderButton.tsx | 6 +++--- src/screens/search/DiscoverUsers.tsx | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/components/common/GradientBorderButton.tsx b/src/components/common/GradientBorderButton.tsx index 00ea7175..00f46a96 100644 --- a/src/components/common/GradientBorderButton.tsx +++ b/src/components/common/GradientBorderButton.tsx @@ -4,7 +4,7 @@ import {StyleSheet, Text, View} from 'react-native'; import {TouchableOpacity} from 'react-native-gesture-handler'; import LinearGradient from 'react-native-linear-gradient'; import {TAGG_LIGHT_BLUE_2, TAGG_PURPLE} from '../../constants'; -import {normalize} from '../../utils'; +import {normalize, SCREEN_WIDTH} from '../../utils'; interface GradientBorderButtonProps { text: string; @@ -45,7 +45,7 @@ const styles = StyleSheet.create({ marginVertical: 15, }, gradientContainer: { - width: 175, + width: SCREEN_WIDTH / 2 - 40, height: 40, }, label: { @@ -57,7 +57,7 @@ const styles = StyleSheet.create({ }, textContainer: { position: 'absolute', - width: 175, + width: SCREEN_WIDTH / 2 - 40, height: 40, justifyContent: 'center', alignItems: 'center', diff --git a/src/screens/search/DiscoverUsers.tsx b/src/screens/search/DiscoverUsers.tsx index d67e5448..b87bfc37 100644 --- a/src/screens/search/DiscoverUsers.tsx +++ b/src/screens/search/DiscoverUsers.tsx @@ -117,7 +117,6 @@ const DiscoverUsers: React.FC = ({route}) => {