This is the application which displays the list of restaurants based on user location or default city (Vienna) using Google APIs. User can see the reviews of each restaurant, add a new review, or add a new restaurant.
- Google Maps API key
This application requires a Google Maps API key to fetch data. Please get an API key here.
1, Get a Google API Keys.
2, Clone the repo
git clone https://github.com/kkig/restaurant-review-site.git
3, Install packages
yarn install
4, Create .env.local
file in the root, and enter your API keys.
REACT_APP_DEV_GOOGLE_KEY = 'YOUR_DEVELOPMENT_API_KEY'
REACT_APP_DEV_GOOGLE_KEY = 'YOUR_PRODUCTION_API_KEY'
-
Select User Location or Default Location
The users can choose to share location or use the default location.
Please check
index.js
insidesrc/components/UserLocationDialog
to change default location.// Default location is Vienna const defLocation = { lat: 48.2088475, lng: 16.371284, };
-
Filter Reviews by Rating
The search results can be filtered by rating using slider.
-
Add Review
The users can add new review with the comment.
-
Add New Restaurant
When the user click map, a dialog will appear to add a new restaurant.
-
Styling Google Map
Please edit
mapStyle.json
file insidesrc/components/Map
to edit Map style. Map style example can be found here.