import React, {useState} from 'react'; import { StatusBar, SafeAreaView, StyleSheet, Text, View, ScrollView, } from 'react-native'; import {SearchBar, SuggestedSection, SearchBackground} from '../../components'; import {SCREEN_HEIGHT} from '../../utils'; /** * Search Screen for user recommendations and a search * tool to allow user to find other users */ const SearchScreen: React.FC = () => { const sections: Array = [ 'People you follow', 'People you may know', 'Trending in sports', 'Trending on Tagg', 'Trending in music', ]; // dummy user data const users: Array = [ 'Sam Davis', 'Becca Smith', 'Ann Taylor', 'Clara Johnson', 'Sarah Jung', 'Lila Hernandez', ]; const [isSearching, setIsSearching] = useState(false); const handleFocus = () => { setIsSearching(true); }; const handleBlur = () => { setIsSearching(false); }; return ( Explore {!isSearching && ( {sections.map((title) => ( ))} )} ); }; const styles = StyleSheet.create({ screen: { paddingTop: 50, paddingBottom: SCREEN_HEIGHT / 10, paddingHorizontal: 15, }, content: { paddingVertical: 20, }, header: { fontWeight: 'bold', fontSize: 24, color: '#fff', marginBottom: 20, textAlign: 'center', }, }); export default SearchScreen;