aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/search/SearchScreen.tsx37
1 files changed, 7 insertions, 30 deletions
diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx
index 87efc3fd..1f8f88f0 100644
--- a/src/screens/search/SearchScreen.tsx
+++ b/src/screens/search/SearchScreen.tsx
@@ -1,20 +1,11 @@
import AsyncStorage from '@react-native-community/async-storage';
import {useFocusEffect} from '@react-navigation/native';
-import React, {useCallback, useEffect, useState} from 'react';
-import {
- Keyboard,
- RefreshControl,
- ScrollView,
- StatusBar,
- StyleSheet,
- Text,
- View,
-} from 'react-native';
+import React, {useEffect, useState} from 'react';
+import {Keyboard, ScrollView, StatusBar, StyleSheet, View} from 'react-native';
import Animated, {Easing, timing} from 'react-native-reanimated';
import {SafeAreaView} from 'react-native-safe-area-context';
import {useDispatch, useSelector} from 'react-redux';
import {
- SearchCategories,
RecentSearches,
SearchBar,
SearchResultList,
@@ -23,7 +14,7 @@ import {
} from '../../components';
import {SEARCH_ENDPOINT, TAGG_LIGHT_BLUE} from '../../constants';
import {loadSearchResults} from '../../services';
-import {loadRecentlySearched, resetScreenType} from '../../store/actions';
+import {resetScreenType} from '../../store/actions';
import {RootState} from '../../store/rootReducer';
import {ProfilePreviewType, ScreenType} from '../../types';
import {normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
@@ -42,7 +33,6 @@ const SearchScreen: React.FC = () => {
);
const [searching, setSearching] = useState(false);
const top = Animated.useValue(-SCREEN_HEIGHT);
- const [refreshing, setRefreshing] = useState<boolean>(false);
const [keyboardVisible, setKeyboardVisible] = React.useState(
'keyboardVisible',
);
@@ -59,16 +49,6 @@ const SearchScreen: React.FC = () => {
}, []);
const dispatch = useDispatch();
- const onRefresh = useCallback(() => {
- const refrestState = async () => {
- dispatch(loadRecentlySearched());
- };
- setRefreshing(true);
- refrestState().then(() => {
- setRefreshing(false);
- });
- }, []);
-
useEffect(() => {
if (query.length < 3) {
setResults(undefined);
@@ -157,10 +137,7 @@ const SearchScreen: React.FC = () => {
keyboardShouldPersistTaps={'always'}
stickyHeaderIndices={[4]}
contentContainerStyle={styles.contentContainer}
- showsVerticalScrollIndicator={false}
- refreshControl={
- <RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
- }>
+ showsVerticalScrollIndicator={false}>
<SearchBar
style={styles.searchBar}
onCancel={handleBlur}
@@ -219,7 +196,7 @@ const styles = StyleSheet.create({
flexGrow: 1,
},
clear: {
- fontSize: 17,
+ fontSize: normalize(17),
fontWeight: 'bold',
color: TAGG_LIGHT_BLUE,
},
@@ -232,7 +209,7 @@ const styles = StyleSheet.create({
},
headerText: {
color: '#fff',
- fontSize: 32,
+ fontSize: normalize(32),
fontWeight: '600',
textAlign: 'center',
marginBottom: '4%',
@@ -240,7 +217,7 @@ const styles = StyleSheet.create({
},
subtext: {
color: '#fff',
- fontSize: 16,
+ fontSize: normalize(16),
fontWeight: '600',
textAlign: 'center',
marginHorizontal: '10%',