-
Notifications
You must be signed in to change notification settings - Fork 59
Trip Details, Trip Viewer Overlay, and Printable Itinerary. #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e657f34
1077fbf
b0e3cd5
6a6aaee
cd26acf
b72c501
db1f3bf
e97bcd2
6defa10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { connect } from 'react-redux' | ||
| import styled from 'styled-components' | ||
| import TripDetailsBase from '@opentripplanner/trip-details' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering if there's a better name for this import.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not super opinionated about this. When I do this I usually do this the other way around a la: import TripDetails from '@opentripplanner/trip-details'
import styled from 'styled-components'
const StyledTripDetails = styled(TripDetails)`
...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be nice to agree on some kind of convention. |
||
|
|
||
| import { getTimeFormat, getLongDateFormat } from '../../util/time' | ||
|
|
||
| const TripDetails = styled(TripDetailsBase)` | ||
| border: 2px solid gray; | ||
| border-radius: 0; | ||
| padding: 6px 10px; | ||
| margin: 16px 0 10px; | ||
| ` | ||
|
|
||
| // Connect imported TripDetails class to redux store. | ||
|
|
||
| const mapStateToProps = (state, ownProps) => { | ||
| return { | ||
| routingType: state.otp.currentQuery.routingType, | ||
| tnc: state.otp.tnc, | ||
| timeFormat: getTimeFormat(state.otp.config), | ||
| longDateFormat: getLongDateFormat(state.otp.config) | ||
| } | ||
| } | ||
|
|
||
| export default connect(mapStateToProps)(TripDetails) | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.