Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jnwelzel/distance-from-x
Calculate the distance between two geographic points.
https://github.com/jnwelzel/distance-from-x
fetch-api geocode react react-hooks react-reducer storybook tailwindcss typescript vite vitest
Last synced: about 1 month ago
JSON representation
Calculate the distance between two geographic points.
- Host: GitHub
- URL: https://github.com/jnwelzel/distance-from-x
- Owner: jnwelzel
- Created: 2024-05-28T07:51:40.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-17T08:54:28.000Z (8 months ago)
- Last Synced: 2024-12-16T20:32:39.322Z (about 2 months ago)
- Topics: fetch-api, geocode, react, react-hooks, react-reducer, storybook, tailwindcss, typescript, vite, vitest
- Language: TypeScript
- Homepage: https://jnwelzel.github.io/distance-from-x/
- Size: 1.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# distance-from-x
This is a simple SPA for calculating the distance between two geograpich points (Point A and Point B) in a straight line.
This can be achieved in three ways:- by directly typing the coordinates into the fields for both points
- searching for a place using the search fields
- using the browser's geolocationOnce the coordinates are in place the user can then calculate the distance. If any errors (validation, Google API) occur, the user is also notified.
# Storybook
[Chromatic](https://www.chromatic.com/library?appId=666fe71a68e95a40107cd295)
# TODOs
- [x] Refactor state -> `useReducer()`
- [x] Update search input with geocoding from browser's coords
- [ ] Add Playwright e2e tests
- [ ] Autocomplete keyboard support
- [ ] Copy coordinates to clipboard
- [ ] Review ESLint/Prettier rules
- [ ] console.log
- [ ] line columns size