import { useContext } from 'react'; import { ActivityIndicator, Alert, FlatList, ScrollView, View, TextInput, TouchableOpacity, Text } from 'react-native'; import { styles } from './Registry.styled'; import { useRegistry } from './useRegistry.hook'; import { SafeAreaView } from 'react-native-safe-area-context'; import Ionicons from '@expo/vector-icons/AntDesign'; import { RegistryItem } from './registryItem/RegistryItem'; import Colors from 'constants/Colors'; export function Registry({ closeRegistry, openContact }) { const search = async () => { try { await actions.search(); } catch (err) { console.log(err); Alert.alert( 'Server Listing Failed', 'Please try again.' ); } } const { state, actions } = useRegistry(); return ( { state.tabbed && ( <> { state.busy && ( )} { !state.busy && ( )} } keyExtractor={item => item.guid} /> )} { !state.tabbed && ( { state.busy && ( )} { !state.busy && ( )} } keyExtractor={item => item.guid} /> )} ); }