Hello,
Would that be possible to get the answers or some hints for the additional features to implement as part of step #28 of part 4 of the Ravenous project?
I am struggling to apply several of these features!
Thanks a lot.
*** Edit ***
Here are my answers:
- Make addresses clickable and have them open the address in Google Maps in a new tab
<div className="Business-information">
<div className="Business-address">
<a href={urlToSearch} target='_blank'>{business.address}</a>
<p>{business.city}</p>
<p>{business.state} {business.zipCode}</p>
- Make images clickable and have them open the businessā website in a new tab
<div className="Business">
<div className="image-container">
<a href={business.url} target='_blank'><img src={business.imageSrc} alt='' /></a>
</div>
- Clicking on a different sorting option automatically requeries the Yelp API, rather than having to manually click āLetās Goā again
handleSortByChange(sortByOption) {
this.setState({
sortBy: sortByOption
}, () => {
this.props.searchYelp(this.state.term, this.state.location, this.state.sortBy);
});
}
- Implement your own type of sort (for example, by entering a distance or radius from a central location)
this.sortByOptions = {
'Best Match': 'best_match',
'Highest Rated': 'rating',
'Most Reviewed': 'review_count',
'Distance From': 'distance',
};
- Allow you to search by pressing āEnterā (or āReturnā) on your keyboard, as opposed to manually clicking
Not found yet
- Add autocompletion of addresses to the āLocationā input
Not found yet