Skip to content

Commit

Permalink
#4: Fixed location name displaying on location search
Browse files Browse the repository at this point in the history
  • Loading branch information
lerastromtsova committed May 16, 2020
1 parent 4184e2f commit 5f26747
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/features/map/MapScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,23 @@ export const MapScreen = props => {
searchResults.map(item => (
<ListItem
key={item.id}
title={item.address}
title={
item.instances.length !== 0
? item.instances[0].name
: item.address
}
onPress={() =>
props.navigation.navigate('Location', {
location: item,
})
}
/>
))}
{isFetching && <Spinner />}
{isFetching && (
<Layout style={shared.centerContent}>
<Spinner />
</Layout>
)}
<Map locations={nearLocations} routeMode={false} />
</SafeAreaView>
);
Expand Down

0 comments on commit 5f26747

Please sign in to comment.