|
@@ -1,5 +1,5 @@
|
|
|
import React, { FC } from 'react';
|
|
|
-import { View, TouchableOpacity, Text } from 'react-native';
|
|
|
+import { View, TouchableOpacity, Text, Dimensions } from 'react-native';
|
|
|
import { Colors } from 'src/theme';
|
|
|
import { getFontSize } from 'src/utils';
|
|
|
import { styles } from './styles';
|
|
@@ -22,6 +22,8 @@ const FriendStatus: FC<FriendStatusProps> = ({
|
|
|
handleSendFriendRequest,
|
|
|
handleUpdateFriendStatus
|
|
|
}) => {
|
|
|
+ const isSmallScreen = Dimensions.get('window').width < 385;
|
|
|
+
|
|
|
switch (status) {
|
|
|
case 4:
|
|
|
return (
|
|
@@ -52,7 +54,9 @@ const FriendStatus: FC<FriendStatusProps> = ({
|
|
|
case 2:
|
|
|
return (
|
|
|
<View style={styles.statusContainer}>
|
|
|
- <Text style={styles.statusTitle}>Friendship pending</Text>
|
|
|
+ <Text style={[styles.statusTitle, isSmallScreen ? { flex: 1.5 } : {}]}>
|
|
|
+ Friendship pending
|
|
|
+ </Text>
|
|
|
<TouchableOpacity
|
|
|
style={[
|
|
|
styles.statusBtn,
|
|
@@ -73,7 +77,14 @@ const FriendStatus: FC<FriendStatusProps> = ({
|
|
|
})
|
|
|
}
|
|
|
>
|
|
|
- <Text style={[styles.statusText, { fontSize: getFontSize(15) }]}>Approve</Text>
|
|
|
+ <Text
|
|
|
+ style={[
|
|
|
+ styles.statusText,
|
|
|
+ { fontSize: isSmallScreen ? getFontSize(14) : getFontSize(15) }
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ Approve
|
|
|
+ </Text>
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
<TouchableOpacity
|
|
@@ -96,7 +107,14 @@ const FriendStatus: FC<FriendStatusProps> = ({
|
|
|
})
|
|
|
}
|
|
|
>
|
|
|
- <Text style={[styles.statusText, { fontSize: getFontSize(15) }]}>Deny</Text>
|
|
|
+ <Text
|
|
|
+ style={[
|
|
|
+ styles.statusText,
|
|
|
+ { fontSize: isSmallScreen ? getFontSize(14) : getFontSize(15) }
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ Deny
|
|
|
+ </Text>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
);
|