Skip to content

Commit

Permalink
make stop viewer into schedule viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-heppner-ibigroup committed Oct 18, 2023
1 parent 8a0ed77 commit 2a0ca75
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions lib/components/viewers/stop-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function getDefaultState(timeZone) {
return {
// Compare dates/times in the stop viewer based on the agency's timezone.
date: getCurrentDate(timeZone),
isShowingSchedule: false
isShowingSchedule: true
}
}

Expand Down Expand Up @@ -190,6 +190,11 @@ class StopViewer extends Component {
zoomToPlace(map, stopData)
}

_viewNearby = () => {
const { setViewedNearbyCoords, stopData } = this.props
setViewedNearbyCoords(stopData)
}

_renderHeader = (agencyCount) => {
const {
enableFavoriteStops,
Expand Down Expand Up @@ -332,7 +337,17 @@ class StopViewer extends Component {
>
<Icon Icon={Search} style={{ marginLeft: '0.2em' }} />
</button>
{!isFlex && (
<button
className="link-button pull-right"
onClick={this._viewNearby}
style={{ fontSize: 'small' }}
>
{/* FIXME: What icon should we use? */}
<IconWithText Icon={Calendar}>
<FormattedMessage id="components.StopViewer.viewNearby" />
</IconWithText>
</button>
{/* {!isFlex && (
<button
className="link-button pull-right"
onClick={this._toggleScheduleView}
Expand All @@ -346,7 +361,7 @@ class StopViewer extends Component {
)}
</IconWithText>
</button>
)}
)} */}
</div>
<span role="group">
<FromToLocationPicker
Expand Down Expand Up @@ -508,6 +523,7 @@ const mapDispatchToProps = {
setHoveredStop: uiActions.setHoveredStop,
setLocation: mapActions.setLocation,
setMainPanelContent: uiActions.setMainPanelContent,
setViewedNearbyCoords: uiActions.setViewedNearbyCoords,
toggleAutoRefresh: uiActions.toggleAutoRefresh,
zoomToPlace: mapActions.zoomToPlace
}
Expand Down

0 comments on commit 2a0ca75

Please sign in to comment.