From 2fd91821fccdf647193f5be1af87c6ef903096a1 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 5 Mar 2021 16:13:23 -0800 Subject: lint --- src/screens/search/SearchScreen.tsx | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) (limited to 'src/screens') 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(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={ - - }> + showsVerticalScrollIndicator={false}>