diff options
| author | Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> | 2020-11-20 13:20:49 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-20 16:20:49 -0500 |
| commit | 3214fc765cbce3c6f9092546424249d08622afb1 (patch) | |
| tree | 862aa8872d670195f2a33264f672782ea1077c9c /src/screens | |
| parent | 713d169915a82edfcfe4b44622e3dce8c6adaf0c (diff) | |
[TMA-375] Added discover users to explore (#119)
* Added discover users to explore
* Filtered following users out
* Removed reload button and filtering following users from discover page
* Wrapped contents
* Preview type in types.ts
Diffstat (limited to 'src/screens')
| -rw-r--r-- | src/screens/search/SearchScreen.tsx | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx index aef3d0a8..535b964c 100644 --- a/src/screens/search/SearchScreen.tsx +++ b/src/screens/search/SearchScreen.tsx @@ -1,16 +1,9 @@ import AsyncStorage from '@react-native-community/async-storage'; import React, {useEffect, useState} from 'react'; -import { - Image, - Keyboard, - ScrollView, - StatusBar, - StyleSheet, - Text, - View, -} from 'react-native'; +import {Keyboard, ScrollView, StatusBar, StyleSheet} from 'react-native'; import Animated, {Easing, timing} from 'react-native-reanimated'; import { + DiscoverUsers, RecentSearches, SearchBackground, SearchBar, @@ -34,7 +27,7 @@ const NO_USER: UserType = { */ const SearchScreen: React.FC = () => { - const {recentSearches} = React.useContext(AuthContext); + const {recentSearches, taggUsers} = React.useContext(AuthContext); const [query, setQuery] = useState<string>(''); const [results, setResults] = useState<Array<ProfilePreviewType>>([]); const [recents, setRecents] = useState<Array<ProfilePreviewType>>( @@ -137,19 +130,7 @@ const SearchScreen: React.FC = () => { /> {/* Removed for Alpha for now */} {/* <Explore /> */} - {/* <View> - <View style={styles.textContainer}> - <Text style={styles.headerText}>Coming Soon</Text> - <Text style={styles.subtext}> - We are working on constructing our explore suggestions. You can - still search users for now! - </Text> - </View> - <Image - source={require('../../assets/images/coming-soon.png')} - style={styles.image} - /> - </View> */} + <DiscoverUsers sectionTitle="Discover Users" users={taggUsers} /> <SearchResultsBackground {...{top}}> {results.length === 0 && recents.length !== 0 ? ( <RecentSearches @@ -159,7 +140,7 @@ const SearchScreen: React.FC = () => { recents={recents} /> ) : ( - <SearchResults {...{results}} /> + <SearchResults {...{results}} previewType={'Search'} /> )} </SearchResultsBackground> </ScrollView> |
