This project was bootstrapped with Create React App.
- Gets a user's location or allows a user to type a location.
- Returns geo data as a latLng object
- Uses the latLng data to make a call to the sunset-sunrise API
- Parses the responses to local time and renders sunset and sunrise times in the browser
- Sunrise and sunset icons sunrise by Weltenraser from from The Noun Project
- Work Sans font by Wei Huang from Google Fonts
Can be used with NPM or Yarn. Built and tested using LTS version of Node (10.15.3).
API data is from Sunset and sunrise times API
- Google Maps API key is restricted to
localhost
. - Search is restricted to UK locations to allow response to be converted to local time.
In the project directory, you can run:
Open http://localhost:3000 to view it in the browser.
As above, but using https
. Will warn user before opening site. Required to use geolocation in browsers (e.g. Safari) which don't privilege localhost
.
Launches the test runner in the interactive watch mode.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.