aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-06 14:01:43 -0400
committerIvan Chen <ivan@tagg.id>2021-05-06 14:01:43 -0400
commit4d1229af47aa521ab9115b94669a8014f46d29fe (patch)
treed377809704b15cc4a02dec43b8d66f383f48dcb5
parentc9d32e68fbb9d1bc175722bfda49454a6f627eae (diff)
replaced to use correct normalize function
-rw-r--r--src/components/profile/ProfileBody.tsx12
-rw-r--r--src/components/search/SearchBar.tsx9
-rw-r--r--src/components/suggestedPeople/MutualFriends.tsx3
-rw-r--r--src/routes/main/MainStackScreen.tsx8
-rw-r--r--src/screens/chat/ChatSearchBar.tsx6
5 files changed, 20 insertions, 18 deletions
diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx
index ea1e5166..400a31e7 100644
--- a/src/components/profile/ProfileBody.tsx
+++ b/src/components/profile/ProfileBody.tsx
@@ -1,3 +1,4 @@
+import {useNavigation} from '@react-navigation/core';
import React, {useContext} from 'react';
import {
Alert,
@@ -7,30 +8,29 @@ import {
Text,
View,
} from 'react-native';
-import {normalize} from 'react-native-elements';
import {useDispatch, useSelector, useStore} from 'react-redux';
+import {ChatContext} from '../../App';
import {TAGG_DARK_BLUE, TOGGLE_BUTTON_TYPE} from '../../constants';
+import {ERROR_UNABLE_CONNECT_CHAT} from '../../constants/strings';
import {
acceptFriendRequest,
declineFriendRequest,
updateUserXFriends,
updateUserXProfileAllScreens,
} from '../../store/actions';
-import {canViewProfile} from '../../utils/users';
import {NO_PROFILE} from '../../store/initialStates';
import {RootState} from '../../store/rootReducer';
import {ScreenType} from '../../types';
import {
createChannel,
getUserAsProfilePreviewType,
+ normalize,
SCREEN_HEIGHT,
SCREEN_WIDTH,
} from '../../utils';
-import {FriendsButton, BasicButton} from '../common';
+import {canViewProfile} from '../../utils/users';
+import {BasicButton, FriendsButton} from '../common';
import ToggleButton from './ToggleButton';
-import {ChatContext} from '../../App';
-import {useNavigation} from '@react-navigation/core';
-import {ERROR_UNABLE_CONNECT_CHAT} from '../../constants/strings';
interface ProfileBodyProps {
onLayout: (event: LayoutChangeEvent) => void;
diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx
index ea36d58b..8a53178b 100644
--- a/src/components/search/SearchBar.tsx
+++ b/src/components/search/SearchBar.tsx
@@ -1,6 +1,7 @@
import React, {useEffect, useState} from 'react';
import {
Keyboard,
+ LayoutChangeEvent,
NativeSyntheticEvent,
StyleSheet,
Text,
@@ -10,14 +11,12 @@ import {
TouchableOpacity,
View,
ViewStyle,
- LayoutChangeEvent,
} from 'react-native';
-import {normalize} from 'react-native-elements';
import Animated, {useAnimatedStyle} from 'react-native-reanimated';
import Icon from 'react-native-vector-icons/Feather';
import {useSelector} from 'react-redux';
import {RootState} from '../../store/rootReducer';
-import {getSearchSuggestions} from '../../utils';
+import {getSearchSuggestions, normalize} from '../../utils';
const AnimatedIcon = Animated.createAnimatedComponent(Icon);
@@ -166,9 +165,9 @@ const styles = StyleSheet.create({
},
input: {
flex: 1,
- fontSize: 16,
+ fontSize: normalize(19),
color: '#000',
- letterSpacing: normalize(0.5),
+ letterSpacing: 0.5,
},
cancelButton: {
height: '100%',
diff --git a/src/components/suggestedPeople/MutualFriends.tsx b/src/components/suggestedPeople/MutualFriends.tsx
index f72104d4..3e2dc851 100644
--- a/src/components/suggestedPeople/MutualFriends.tsx
+++ b/src/components/suggestedPeople/MutualFriends.tsx
@@ -1,10 +1,9 @@
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet, Text, View} from 'react-native';
-import {normalize} from 'react-native-elements';
import {ScrollView, TouchableOpacity} from 'react-native-gesture-handler';
import {BottomDrawer, TabsGradient} from '../../components';
import {ProfilePreviewType, ScreenType} from '../../types';
-import {isIPhoneX, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
+import {isIPhoneX, normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
import {ProfilePreview} from '../profile';
interface MutualFriendsProps {
diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx
index f5100e58..1105b6f9 100644
--- a/src/routes/main/MainStackScreen.tsx
+++ b/src/routes/main/MainStackScreen.tsx
@@ -2,7 +2,6 @@ import {RouteProp} from '@react-navigation/native';
import {StackNavigationOptions} from '@react-navigation/stack';
import React from 'react';
import {StyleSheet, Text} from 'react-native';
-import {normalize} from 'react-native-elements';
import BackIcon from '../../assets/icons/back-arrow.svg';
import {
AccountType,
@@ -34,7 +33,12 @@ import {
} from '../../screens';
import MutualBadgeHolders from '../../screens/suggestedPeople/MutualBadgeHolders';
import {ScreenType} from '../../types';
-import {AvatarHeaderHeight, ChatHeaderHeight, SCREEN_WIDTH} from '../../utils';
+import {
+ AvatarHeaderHeight,
+ ChatHeaderHeight,
+ normalize,
+ SCREEN_WIDTH,
+} from '../../utils';
import {MainStack, MainStackParams} from './MainStackNavigator';
/**
diff --git a/src/screens/chat/ChatSearchBar.tsx b/src/screens/chat/ChatSearchBar.tsx
index 3531111b..91018d4c 100644
--- a/src/screens/chat/ChatSearchBar.tsx
+++ b/src/screens/chat/ChatSearchBar.tsx
@@ -10,8 +10,8 @@ import {
TouchableOpacity,
View,
} from 'react-native';
-import {normalize} from 'react-native-elements';
import Animated from 'react-native-reanimated';
+import {normalize} from '../../utils';
interface SearchBarProps extends TextInputProps {
onCancel: () => void;
@@ -76,9 +76,9 @@ const styles = StyleSheet.create({
},
input: {
flex: 1,
- fontSize: 16,
+ fontSize: normalize(16),
color: '#000',
- letterSpacing: normalize(0.5),
+ letterSpacing: 0.5,
},
cancelButton: {
justifyContent: 'center',