From 0bb9f241a4e0ec6b9b22cb9b3b2e5b633b5e43c4 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Tue, 2 Mar 2021 07:45:00 -0800 Subject: Initial --- src/routes/main/MainStackNavigator.tsx | 4 ++++ src/routes/main/MainStackScreen.tsx | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'src/routes') diff --git a/src/routes/main/MainStackNavigator.tsx b/src/routes/main/MainStackNavigator.tsx index 901dd993..e271837f 100644 --- a/src/routes/main/MainStackNavigator.tsx +++ b/src/routes/main/MainStackNavigator.tsx @@ -7,6 +7,7 @@ import { CategorySelectionScreenType, MomentType, ScreenType, + SearchCategoryType, UserType, } from '../../types'; @@ -20,6 +21,9 @@ export type MainStackParams = { RequestContactsAccess: { screenType: ScreenType; }; + DiscoverUsers: { + searchCategory: SearchCategoryType; + }; Profile: { userXId: string | undefined; screenType: ScreenType; diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx index 91ed2f70..730ba1c8 100644 --- a/src/routes/main/MainStackScreen.tsx +++ b/src/routes/main/MainStackScreen.tsx @@ -11,6 +11,7 @@ import { CaptionScreen, CategorySelection, CreateCustomCategory, + DiscoverUsers, EditProfile, FriendsListScreen, IndividualMoment, @@ -139,6 +140,13 @@ const MainStackScreen: React.FC = ({route}) => { initialParams={{screenType}} /> )} + Date: Fri, 5 Mar 2021 16:13:23 -0800 Subject: lint --- src/components/profile/Content.tsx | 7 ++-- .../SuggestedPeopleOnboardingStackNavigator.tsx | 4 ++- src/screens/search/SearchScreen.tsx | 37 ++++------------------ 3 files changed, 13 insertions(+), 35 deletions(-) (limited to 'src/routes') diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index ae9f9564..d4c50d5c 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -109,10 +109,9 @@ const Content: React.FC = ({y, userXId, screenType}) => { const [isStageOnePromptClosed, setIsStageOnePromptClosed] = useState( false, ); - const [ - isStageThreePromptClosed, - setIsStageThreePromptClosed, - ] = useState(false); + const [isStageThreePromptClosed, setIsStageThreePromptClosed] = useState< + boolean + >(false); const onRefresh = useCallback(() => { const refrestState = async () => { diff --git a/src/routes/suggestedPeopleOnboarding/SuggestedPeopleOnboardingStackNavigator.tsx b/src/routes/suggestedPeopleOnboarding/SuggestedPeopleOnboardingStackNavigator.tsx index 737c503c..63547acb 100644 --- a/src/routes/suggestedPeopleOnboarding/SuggestedPeopleOnboardingStackNavigator.tsx +++ b/src/routes/suggestedPeopleOnboarding/SuggestedPeopleOnboardingStackNavigator.tsx @@ -8,4 +8,6 @@ export type SuggestedPeopleOnboardingStackParams = { BadgeSelection: undefined; }; -export const SuggestedPeopleOnboardingStack = createStackNavigator(); +export const SuggestedPeopleOnboardingStack = createStackNavigator< + SuggestedPeopleOnboardingStackParams +>(); 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}>