-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚲 Bike station migration 🚲 : Moving to mobility API (v2) (#470)
Migrate to mobility v2 API for bike stations * Upgraded @entur/sdk package to 4.2.0 * Changed bikeStations hook to use mobilityV2 api * Migrated from type BikeRentalStation to Station.. * Part of the migration to use mobility v2 api to fetch bike rental stations * The new API returns data of the type Station, with different properties * Implemented getTranslation utility function * .. to be used with objects of the TranslatedString type from entur/sdk * enables easier language-change if future translations are added to the API Fixed render loop in useEffect * Fixed missing bike-tile * Refactored useEffect into smaller responsibilities Changed implementation to use custom useBikeRentalStations hook in EditTab migrating to new bike rental stations in BikeSearch * Migrating to fetch from mobility API v2 in BikeSearch * Type migration BikeRentalStation -> Station * Refactor: Renamed exported component in StopPlaceSearch to match filename * added argument removeHiddenStations which may be set to false to enable usability for EditTab where hidden stations is needed in toggle-list Fix: Disabled ability to add duplicate stations * Fixed conditionless adding of bike rental station added through search field. Now checks if ID is already stored in settings.newStations * Refactor: Cleanup useEffects using AbortController * Changed cleanups in useEffects (in EditTab/*) to use AbortController instead of primitive boolean variable * Fixed defaults when missing station name in EditTab/ * Default to empty string '' * Sorting station names defaults to putting stations with missing name last
- Loading branch information
Showing
16 changed files
with
197 additions
and
140 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.