diff --git a/lib/components/map/connected-endpoints-overlay.tsx b/lib/components/map/connected-endpoints-overlay.tsx index acbc0a23e..c86b4d4af 100644 --- a/lib/components/map/connected-endpoints-overlay.tsx +++ b/lib/components/map/connected-endpoints-overlay.tsx @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import { IntlShape, useIntl } from 'react-intl' -import { UserLocationAndType } from '@opentripplanner/types' +import { Location, UserLocationAndType } from '@opentripplanner/types' import EndpointsOverlay from '@opentripplanner/endpoints-overlay' import React, { ComponentProps, useCallback } from 'react' @@ -13,16 +13,19 @@ import { } from '../../actions/user' import { getActiveSearch, getShowUserSettings } from '../../util/state' import { setLocation } from '../../actions/map' +import { setViewedStop } from '../../actions/ui' import { toastOnPlaceSaved } from '../util/toasts' type Props = ComponentProps & { forgetPlace: (place: string, intl: IntlShape) => void rememberPlace: (arg: UserLocationAndType, intl: IntlShape) => number + setViewedStop: (arg: Location) => void } const ConnectedEndpointsOverlay = ({ forgetPlace, rememberPlace, + setViewedStop, ...otherProps }: Props): JSX.Element => { const intl = useIntl() @@ -47,6 +50,7 @@ const ConnectedEndpointsOverlay = ({ {...otherProps} forgetPlace={_forgetPlace} rememberPlace={_rememberPlace} + setViewNearby={setViewedStop} /> ) } @@ -89,7 +93,8 @@ const mapDispatchToProps = { clearLocation, forgetPlace, rememberPlace, - setLocation + setLocation, + setViewedStop } export default connect( diff --git a/package.json b/package.json index f211c743e..1d9c35894 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@opentripplanner/base-map": "4.0.0", "@opentripplanner/building-blocks": "2.1.0", "@opentripplanner/core-utils": "12.0.1", - "@opentripplanner/endpoints-overlay": "3.0.1", + "@opentripplanner/endpoints-overlay": "3.1.0", "@opentripplanner/from-to-location-picker": "3.0.0", "@opentripplanner/geocoder": "^3.0.2", "@opentripplanner/humanize-distance": "^1.2.0", diff --git a/yarn.lock b/yarn.lock index 1f29a0b0f..3d9ff499c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2451,10 +2451,10 @@ lodash.isequal "^4.5.0" qs "^6.9.1" -"@opentripplanner/endpoints-overlay@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-3.0.1.tgz#b6b8e2f08ae41fbaad475fc0f0fe3e72d7d36463" - integrity sha512-X3T0GM8U+VU/mOOSNUgj6fVcjAKMeciKFYnQNbKiNgNeDHa5JltwvtXsM4x3wCLP2xAF6jH/HTWJmYmsfLPlAw== +"@opentripplanner/endpoints-overlay@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-3.1.0.tgz#92ad54ed9445385e25c2a968f700945ae4fc9315" + integrity sha512-FxQrd/nDIP9Tq5yfMFVgWx0QIXmy64y521r6yFCNsY/rBLSAtnLCVMLNUW+bCtdo3IUpeSpqshJDLYHHDHpa/g== dependencies: "@opentripplanner/base-map" "^4.0.0" "@opentripplanner/building-blocks" "^2.0.0"