Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
55c5f5b
feat(FavoriteLocationsPane): Add locations using LocationField.
binh-dam-ibigroup Sep 10, 2020
d13a712
refactor(FavoriteLocationsPane): Expand use of LocationField.
binh-dam-ibigroup Sep 16, 2020
ca1d279
refactor(FavoriteLocationsPane): Improve LocationField styling.
binh-dam-ibigroup Dec 2, 2020
34f99bd
refactor(FavoriteLocationsPane): Extract FavoriteLocation component.
binh-dam-ibigroup Dec 2, 2020
a8f031d
refactor(FavoriteLocation): Convert component into full class.
binh-dam-ibigroup Dec 2, 2020
150eba6
refactor(FavoriteLocation): Move event handling and state to inside c…
binh-dam-ibigroup Dec 2, 2020
4b52498
refactor(FavoriteLocation): Tweak styles.
binh-dam-ibigroup Dec 4, 2020
6960a1e
refactor(FavoriteLocation): Extract FavoriteLocation into file.
binh-dam-ibigroup Dec 4, 2020
923b74d
refactor(FavoriteLocation): Tweak comments
binh-dam-ibigroup Dec 4, 2020
6e2c0b9
refactor(connectLocationField): Encapsulate code to connect LocationF…
binh-dam-ibigroup Dec 9, 2020
6221ab0
refactor(LocationField): refactor HOC for LocationField
landonreed Dec 9, 2020
31ed484
Merge pull request #285 from opentripplanner/connect-location-field-ltr
binh-dam-ibigroup Dec 9, 2020
95e1c9c
refactor(IntermediatePlaceField): Add back actions and unset location…
binh-dam-ibigroup Dec 9, 2020
4cd86a3
refactor(FontAwesome): Replace with narrative/icon wrapper.
binh-dam-ibigroup Dec 9, 2020
cae2ba7
refactor(connectLocationField): Add comment detail about leaving loca…
binh-dam-ibigroup Dec 10, 2020
6d5f731
Merge branch 'improve-save-user-locations' into connect-location-field
binh-dam-ibigroup Dec 10, 2020
c3405b4
Merge pull request #284 from opentripplanner/connect-location-field
binh-dam-ibigroup Dec 10, 2020
eccfa5c
refactor(mobile/NavigationBar): Replace FontAwesome with narrative/Icon
binh-dam-ibigroup Dec 10, 2020
4227cd6
refactor(util/user): Move isHome and isWork to util.
binh-dam-ibigroup Dec 4, 2020
9298f94
refactor(NewFavoriteLocation): Split NewFavoriteLocation from Favorit…
binh-dam-ibigroup Dec 10, 2020
bcce0e4
refactor(FavoriteLocation): Replace isFixed prop with placeholder prop
binh-dam-ibigroup Dec 10, 2020
23f0829
feat(FavoriteLocation): Allow user to edit nickname of favorite locat…
binh-dam-ibigroup Dec 11, 2020
b5b3739
refactor(FixedFavoriteLocation): Extract FixedFavoriteLocation. Move …
binh-dam-ibigroup Dec 11, 2020
c5ec4f6
refactor(FavoriteLocation*): Make a few tweaks
binh-dam-ibigroup Dec 11, 2020
4a33ffd
fix(UserAccountScreen): Fix blank home/work place labels on new accounts
binh-dam-ibigroup Dec 16, 2020
3787ba8
refactor(UserAccountScreen): Force name for home and work locations.
binh-dam-ibigroup Dec 16, 2020
18d2ad3
refactor(favorite-locations): Move location components to subfolder.
binh-dam-ibigroup Dec 29, 2020
8a0ea44
fix(constants): update auth0 scope for ibi-group/otp-middleware#120
landonreed Dec 14, 2020
b421fd3
refactor(FavoriteLocation): Change component for new desired behavior.
binh-dam-ibigroup Jan 12, 2021
fe5f6a6
refactor(FavoritePlaceRow): Rename. Absorb NewFavoriteLocation.
binh-dam-ibigroup Jan 12, 2021
18b4b5c
refactor(FavoritePlaceScreen): Extract place editing to separate screen.
binh-dam-ibigroup Jan 13, 2021
8350db6
improvement(places): Add navigation, editing, and saving functionality
binh-dam-ibigroup Jan 14, 2021
1b564a2
refactor(SavedTripScreen): Improve getting trip id from URL
binh-dam-ibigroup Jan 14, 2021
9c03c69
improvement(FavoritePlaceScreen): Add validation
binh-dam-ibigroup Jan 14, 2021
cce939f
refactor: Reuse code to get validation state
binh-dam-ibigroup Jan 14, 2021
337ba7b
refactor: Rename/move components, remove dead code.
binh-dam-ibigroup Jan 15, 2021
4f2e012
refactor(FavoritePlaceRow): Remove Formik dependency; refactor.
binh-dam-ibigroup Jan 15, 2021
29b4cf0
refactor(PlaceEditor): Fix typos
binh-dam-ibigroup Jan 15, 2021
298a4bc
refactor: Fix import order
binh-dam-ibigroup Jan 15, 2021
0646041
refactor(ResponsiveWebapp): Move TODO comment into #309.
binh-dam-ibigroup Jan 19, 2021
4528844
Merge branch 'dev' into improve-save-user-locations
binh-dam-ibigroup Jan 25, 2021
6930036
refactor(FavoritePlaceEditor): Merge with new page design
binh-dam-ibigroup Jan 26, 2021
53797da
refactor: Address PR review comments.
binh-dam-ibigroup Jan 26, 2021
c08040e
refactor(FavoritePlacesPane): Delete updates db on the spot.
binh-dam-ibigroup Jan 26, 2021
6af8e50
refactor(FavoritePlaceRow): Fix new place broken link.
binh-dam-ibigroup Jan 26, 2021
d18258d
fix(BackToTripPlanner): Preserve query params.
binh-dam-ibigroup Jan 27, 2021
39756cb
refactor(FavoritePlaceRow): Preserve search params in links.
binh-dam-ibigroup Jan 27, 2021
707d323
refactor(FavoritePlacesPane): Add /account/places to constants.
binh-dam-ibigroup Jan 27, 2021
397254b
refactor(connected-links): Move code to retireve redux query to new c…
binh-dam-ibigroup Jan 27, 2021
eb9f998
docs(connected-links): Tweak comments.
binh-dam-ibigroup Jan 27, 2021
757a84e
fix(UserAccountScreen): Return to places pane after new user edits.
binh-dam-ibigroup Jan 28, 2021
96f261b
refactor(SequentialPaneDisplay): Improve navigation handling.
binh-dam-ibigroup Jan 29, 2021
56069bf
refactor: Fix broken links, add comments.
binh-dam-ibigroup Jan 29, 2021
2a10e54
refactor: Make various refactors.
binh-dam-ibigroup Jan 29, 2021
060ebb0
refactor(BackLink): Extract back button link.
binh-dam-ibigroup Feb 3, 2021
e011260
refactor(BackLink): Move markup into BackLink
binh-dam-ibigroup Feb 3, 2021
addfaf9
refactor(FavoritePlacePage): Use BackLink
binh-dam-ibigroup Feb 3, 2021
bdcebdf
refactor(SequentialPaneDisplay): Improve routing
binh-dam-ibigroup Feb 3, 2021
209318f
improvement(PlaceLocationField): Accommodate mobile view.
binh-dam-ibigroup Feb 3, 2021
b207eb6
refactor(connected-links): Remove empty mapDispatchToProps
binh-dam-ibigroup Feb 3, 2021
d121350
refactor(actions/user): Sort places after fetch. Refactor accordingly.
binh-dam-ibigroup Feb 5, 2021
35eb848
refactor(connected-links): Rename exports per PR comments.
binh-dam-ibigroup Feb 5, 2021
436b93d
refactor: Address some PR comments
binh-dam-ibigroup Feb 5, 2021
65c087f
refactor(PlaceLocationField): Show ellipsis for long place names in m…
binh-dam-ibigroup Feb 5, 2021
6c9e778
refactor(BackLink,BackToTripPlanner): Use icon with margin, refactor.
binh-dam-ibigroup Feb 5, 2021
7681713
refactor(FavoritePlacesList): Fix renaming snafu
binh-dam-ibigroup Feb 8, 2021
e74f3f0
refactor(PlaceEditor): Fix ToogleButtonGroup prop
binh-dam-ibigroup Feb 8, 2021
2df41d8
refactor(VerifyEmailPane): Map email verif pane with its own URL.
binh-dam-ibigroup Feb 8, 2021
53d7b15
refactor(UserAccountScreen): Remove passing panes prop.
binh-dam-ibigroup Feb 8, 2021
60b8864
refactor(places): Address browser console errors.
binh-dam-ibigroup Feb 11, 2021
70f449c
fix(FavoritePlaceScreen): Do not show account header while setting up…
binh-dam-ibigroup Feb 16, 2021
411caf1
refactor(FavoritePlaceScreen): Use FormNavigationButtons.
binh-dam-ibigroup Feb 16, 2021
84bda39
refactor(FavoritePlaceScreen): Add space before back/save buttons.
binh-dam-ibigroup Feb 16, 2021
127e97d
refactor(PlaceLocationField): Accommodate Back/Save buttons below the…
binh-dam-ibigroup Feb 16, 2021
9da1fec
refactor(PlaceLocationField): Fix lint
binh-dam-ibigroup Feb 16, 2021
a083c8b
Revert "refactor(PlaceLocationField): Fix lint"
binh-dam-ibigroup Feb 17, 2021
7985f67
Revert "refactor(PlaceLocationField): Accommodate Back/Save buttons b…
binh-dam-ibigroup Feb 17, 2021
326199f
refactor(FavoritePlaceScreen): Use FormNavigationButtons on desktop v…
binh-dam-ibigroup Feb 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 54 additions & 8 deletions lib/actions/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { setQueryParam } from './form'
import { routeTo } from './ui'
import { TRIPS_PATH } from '../util/constants'
import { secureFetch } from '../util/middleware'
import { isNewUser } from '../util/user'
import { isBlank } from '../util/ui'
import { isNewUser, positionHomeAndWorkFirst } from '../util/user'

// Middleware API paths.
const API_MONITORED_TRIP_PATH = '/api/secure/monitoredtrip'
Expand Down Expand Up @@ -78,13 +79,18 @@ export function fetchAuth0Token (auth0) {
}

/**
* Updates the redux state with the provided user data,
* and also fetches monitored trips if requested, i.e. when
* Updates the redux state with the provided user data, including
* placing the Home and Work locations at the beginning of the list
* of saved places for rendering in several UI components.
*
* Also, fetches monitored trips if requested, i.e. when
* - initializing the user state with an existing persisted user, or
* - POST-ing a user for the first time.
*/
function setUser (user, fetchTrips) {
return function (dispatch, getState) {
positionHomeAndWorkFirst(user)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't think the client should be concerned with this, but I won't make this blocking so we can move forward. I do think we should add an issue to otp-middleware that handles this sorting before persisting an update and ensures that there is only one home/work location for any given user.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


dispatch(setCurrentUser(user))

if (fetchTrips) {
Expand Down Expand Up @@ -129,7 +135,8 @@ export function fetchOrInitializeUser (auth0User) {
const isNewAccount = status === 'error' || (user && user.result === 'ERR')
const userData = isNewAccount ? createNewUser(auth0User) : user

// Set uset in redux state. (Fetch trips for existing users.)
// Set user in redux state.
// (This sorts saved places, and, for existing users, fetches trips.)
dispatch(setUser(userData, !isNewAccount))
}
}
Expand All @@ -146,6 +153,11 @@ export function createOrUpdateUser (userData, silentOnSuccess = false) {
const { id } = userData // Middleware ID, NOT auth0 (or similar) id.
let requestUrl, method

// Before persisting, filter out entries from userData.savedLocations with blank addresses.
userData.savedLocations = userData.savedLocations.filter(
({ address }) => !isBlank(address)
)

// Determine URL and method to use.
const isCreatingUser = isNewUser(loggedInUser)
if (isCreatingUser) {
Expand All @@ -156,19 +168,20 @@ export function createOrUpdateUser (userData, silentOnSuccess = false) {
method = 'PUT'
}

const { data, message, status } = await secureFetch(requestUrl, accessToken, apiKey, method, {
const { data: returnedUser, message, status } = await secureFetch(requestUrl, accessToken, apiKey, method, {
body: JSON.stringify(userData)
})

// TODO: improve the UI feedback messages for this.
if (status === 'success' && data) {
if (status === 'success' && returnedUser) {
if (!silentOnSuccess) {
alert('Your preferences have been saved.')
}

// Update application state with the user entry as saved
// (as returned) by the middleware. (Fetch trips if creating user.)
dispatch(setUser(data, isCreatingUser))
// (as returned) by the middleware.
// (This sorts saved places, and, for existing users, fetches trips.)
dispatch(setUser(returnedUser, isCreatingUser))
} else {
alert(`An error was encountered:\n${JSON.stringify(message)}`)
}
Expand Down Expand Up @@ -291,6 +304,7 @@ export function toggleSnoozeTrip (trip) {
export function confirmAndDeleteUserMonitoredTrip (tripId) {
return async function (dispatch, getState) {
if (!confirm('Would you like to remove this trip?')) return

const { accessToken, apiBaseUrl, apiKey } = getMiddlewareVariables(getState())
const requestUrl = `${apiBaseUrl}${API_MONITORED_TRIP_PATH}/${tripId}`

Expand Down Expand Up @@ -417,3 +431,35 @@ export function planNewTripFromMonitoredTrip (monitoredTrip) {
}, 300)
}
}

/**
* Saves the given place data at the specified index for the logged-in user.
* Note: places with blank addresses will not appear in persistence.
*/
export function saveUserPlace (placeToSave, placeIndex) {
return function (dispatch, getState) {
const { loggedInUser } = getState().user

if (placeIndex === 'new') {
loggedInUser.savedLocations.push(placeToSave)
} else {
loggedInUser.savedLocations[placeIndex] = placeToSave
}

dispatch(createOrUpdateUser(loggedInUser, true))
}
}

/**
* Delete the place data at the specified index for the logged-in user.
*/
export function deleteUserPlace (placeIndex) {
return function (dispatch, getState) {
if (!confirm('Would you like to remove this place?')) return

const { loggedInUser } = getState().user
loggedInUser.savedLocations.splice(placeIndex, 1)

dispatch(createOrUpdateUser(loggedInUser, true))
}
}
24 changes: 18 additions & 6 deletions lib/components/app/responsive-webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import coreUtils from '@opentripplanner/core-utils'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Redirect, Route, Switch, withRouter } from 'react-router'
import { Route, Switch, withRouter } from 'react-router'

import PrintLayout from './print-layout'
import * as authActions from '../../actions/auth'
Expand All @@ -16,20 +16,25 @@ import * as formActions from '../../actions/form'
import * as locationActions from '../../actions/location'
import * as mapActions from '../../actions/map'
import * as uiActions from '../../actions/ui'
import { RedirectWithQuery } from '../form/connected-links'
import { getAuth0Config } from '../../util/auth'
import {
ACCOUNT_PATH,
AUTH0_AUDIENCE,
AUTH0_SCOPE,
ACCOUNT_SETTINGS_PATH,
CREATE_ACCOUNT_PATH,
CREATE_ACCOUNT_PLACES_PATH,
CREATE_ACCOUNT_VERIFY_PATH,
PLACES_PATH,
TRIPS_PATH,
URL_ROOT
} from '../../util/constants'
import { ComponentContext } from '../../util/contexts'
import { getActiveItinerary, getTitle } from '../../util/state'
import AfterSignInScreen from '../user/after-signin-screen'
import BeforeSignInScreen from '../user/before-signin-screen'
import FavoritePlaceScreen from '../user/places/favorite-place-screen'
import SavedTripList from '../user/monitored-trip/saved-trip-list'
import SavedTripScreen from '../user/monitored-trip/saved-trip-screen'
import UserAccountScreen from '../user/user-account-screen'
Expand Down Expand Up @@ -158,11 +163,11 @@ const mapStateToProps = (state, ownProps) => {
activeItinerary: getActiveItinerary(state.otp),
activeSearchId: state.otp.activeSearchId,
currentPosition: state.otp.location.currentPosition,
query: state.otp.currentQuery,
searches: state.otp.searches,
mobileScreen: state.otp.ui.mobileScreen,
initZoomOnLocate: state.otp.config.map && state.otp.config.map.initZoomOnLocate,
mobileScreen: state.otp.ui.mobileScreen,
modeGroups: state.otp.config.modeGroups,
query: state.otp.currentQuery,
searches: state.otp.searches,
title
}
}
Expand Down Expand Up @@ -231,17 +236,24 @@ class RouterWrapperWithAuth0 extends Component {
]}
render={() => <WebappWithRouter {...this.props} />}
/>
<Route
component={FavoritePlaceScreen}
path={[`${CREATE_ACCOUNT_PLACES_PATH}/:id`, `${PLACES_PATH}/:id`]}
/>
<Route
component={SavedTripScreen}
path={`${TRIPS_PATH}/:id`}
/>
<Route exact path={ACCOUNT_PATH}>
<Redirect to={TRIPS_PATH} />
<RedirectWithQuery to={TRIPS_PATH} />
</Route>
<Route exact path={CREATE_ACCOUNT_PATH}>
<RedirectWithQuery to={CREATE_ACCOUNT_VERIFY_PATH} />
</Route>
<Route
// This route lets new or existing users edit or set up their account.
component={UserAccountScreen}
path={[CREATE_ACCOUNT_PATH, ACCOUNT_SETTINGS_PATH]}
path={[`${CREATE_ACCOUNT_PATH}/:step`, ACCOUNT_SETTINGS_PATH]}
/>
<Route
component={SavedTripList}
Expand Down
53 changes: 53 additions & 0 deletions lib/components/form/connect-location-field.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { connect } from 'react-redux'

import * as apiActions from '../../actions/api'
import * as locationActions from '../../actions/location'
import { getActiveSearch, getShowUserSettings } from '../../util/state'

/**
* This higher-order component connects the target (styled) LocationField to the
* redux store.
* @param StyledLocationField The input LocationField component to connect.
* @param options Optional object with the following optional props:
* - actions: a list of actions to include in mapDispatchToProps
* - includeLocation: whether to derive the location prop from
* the active query
* @returns The connected component.
*/
export default function connectLocationField (StyledLocationField, options = {}) {
// By default, set actions to empty list and do not include location.
const {actions = [], includeLocation = false} = options
const mapStateToProps = (state, ownProps) => {
const { config, currentQuery, location, transitIndex, user } = state.otp
const { currentPosition, nearbyStops, sessionSearches } = location
const activeSearch = getActiveSearch(state.otp)
const query = activeSearch ? activeSearch.query : currentQuery

const stateToProps = {
currentPosition,
geocoderConfig: config.geocoder,
nearbyStops,
sessionSearches,
showUserSettings: getShowUserSettings(state.otp),
stopsIndex: transitIndex.stops,
userLocationsAndRecentPlaces: [...user.locations, ...user.recentPlaces]
}
// Set the location prop only if includeLocation is specified, else leave unset.
// Otherwise, the StyledLocationField component will use the fixed undefined/null value as location
// and will not respond to user input.
if (includeLocation) {
stateToProps.location = query[ownProps.locationType]
}

return stateToProps
}

const mapDispatchToProps = {
addLocationSearch: locationActions.addLocationSearch,
findNearbyStops: apiActions.findNearbyStops,
getCurrentPosition: locationActions.getCurrentPosition,
...actions
}

return connect(mapStateToProps, mapDispatchToProps)(StyledLocationField)
}
39 changes: 39 additions & 0 deletions lib/components/form/connected-links.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react'
import { connect } from 'react-redux'
import { LinkContainer } from 'react-router-bootstrap'
import { Redirect } from 'react-router'
import { Link } from 'react-router-dom'

/**
* This function enhances the routing components imported above
* by preserving the itinerary search query from the redux state
* when redirecting the user between the main map and account-related pages,
* so that when the user returns to the map, the itinerary that was previously
* displayed is shown again.
* Implementers only need to specify the 'to' route and
* do not need to hook to redux store to retrieve the itinerary search query.
* @param RoutingComponent The routing component to enhance.
* @returns A new component that passes the redux search params to
* the RoutingComponent's 'to' prop.
*/
const withQueryParams = RoutingComponent =>
({ children, queryParams, to, ...props }) => (
<RoutingComponent {...props} to={{ pathname: to, search: queryParams }}>
{children}
</RoutingComponent>
)

// For connecting to the redux store
const mapStateToProps = (state, ownProps) => {
return {
queryParams: state.router.location.search
}
}

// Enhance routing components, connect the result to redux,
// and export.
export default {
LinkWithQuery: connect(mapStateToProps)(withQueryParams(Link)),
LinkContainerWithQuery: connect(mapStateToProps)(withQueryParams(LinkContainer)),
RedirectWithQuery: connect(mapStateToProps)(withQueryParams(Redirect))
}
42 changes: 9 additions & 33 deletions lib/components/form/connected-location-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ import {
InputGroupAddon,
MenuItemA
} from '@opentripplanner/location-field/lib/styled'
import { connect } from 'react-redux'
import styled from 'styled-components'

import { clearLocation, onLocationSelected } from '../../actions/map'
import { addLocationSearch, getCurrentPosition } from '../../actions/location'
import { findNearbyStops } from '../../actions/api'
import { getActiveSearch, getShowUserSettings } from '../../util/state'
import * as mapActions from '../../actions/map'
import connectLocationField from './connect-location-field'

const StyledLocationField = styled(LocationField)`
width: 100%;
Expand Down Expand Up @@ -55,31 +52,10 @@ const StyledLocationField = styled(LocationField)`
}
`

// connect to redux store

const mapStateToProps = (state, ownProps) => {
const { config, currentQuery, location, transitIndex, user } = state.otp
const { currentPosition, nearbyStops, sessionSearches } = location
const activeSearch = getActiveSearch(state.otp)
const query = activeSearch ? activeSearch.query : currentQuery
return {
currentPosition,
geocoderConfig: config.geocoder,
location: query[ownProps.locationType],
nearbyStops,
sessionSearches,
showUserSettings: getShowUserSettings(state.otp),
stopsIndex: transitIndex.stops,
userLocationsAndRecentPlaces: [...user.locations, ...user.recentPlaces]
}
}

const mapDispatchToProps = {
addLocationSearch,
findNearbyStops,
getCurrentPosition,
onLocationSelected,
clearLocation
}

export default connect(mapStateToProps, mapDispatchToProps)(StyledLocationField)
export default connectLocationField(StyledLocationField, {
actions: {
clearLocation: mapActions.clearLocation,
onLocationSelected: mapActions.onLocationSelected
},
includeLocation: true
})
34 changes: 6 additions & 28 deletions lib/components/form/intermediate-place-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ import {
MenuItemA
} from '@opentripplanner/location-field/lib/styled'
import React, {Component} from 'react'
import { connect } from 'react-redux'
import styled from 'styled-components'

import { clearLocation } from '../../actions/map'
import { addLocationSearch, getCurrentPosition } from '../../actions/location'
import { findNearbyStops } from '../../actions/api'
import { getShowUserSettings } from '../../util/state'
import * as mapActions from '../../actions/map'
import connectLocationField from './connect-location-field'

const StyledIntermediatePlace = styled(LocationField)`
width: 100%;
Expand Down Expand Up @@ -78,27 +75,8 @@ class IntermediatePlaceField extends Component {
}
}

// connect to redux store

const mapStateToProps = (state, ownProps) => {
const { config, location, transitIndex, user } = state.otp
const { currentPosition, nearbyStops, sessionSearches } = location
return {
currentPosition,
geocoderConfig: config.geocoder,
nearbyStops,
sessionSearches,
showUserSettings: getShowUserSettings(state.otp),
stopsIndex: transitIndex.stops,
userLocationsAndRecentPlaces: [...user.locations, ...user.recentPlaces]
export default connectLocationField(IntermediatePlaceField, {
actions: {
clearLocation: mapActions.clearLocation
}
}

const mapDispatchToProps = {
addLocationSearch,
findNearbyStops,
getCurrentPosition,
clearLocation
}

export default connect(mapStateToProps, mapDispatchToProps)(IntermediatePlaceField)
})
Loading