-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adding commuter rail ridership to dashboard #1001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
const href = React.useMemo(() => { | ||
switch (line) { | ||
case 'line-bus': | ||
return `/bus/trips/single?busRoute=1&date=${BUS_DEFAULTS.singleTripConfig.date}`; | ||
case 'line-commuter-rail': | ||
return `/commuter-rail/ridership?crRoute=CR-Lowell&startDate=${COMMUTER_RAIL_DEFAULTS.lineConfig.startDate}&endDate=${COMMUTER_RAIL_DEFAULTS.lineConfig.endDate}`; | ||
default: | ||
return getLineSelectionItemHref(line, route); | ||
} | ||
}, [line, route]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we util
this?
@@ -20,7 +20,7 @@ export const BetaDataNotice: React.FC = () => { | |||
const isEndDateAfterBusMaxDay = endDate !== undefined && dayjs(endDate).isAfter(BUS_MAX_DAY); | |||
|
|||
if ( | |||
(line === 'line-bus' || linePath === 'bus') && | |||
(line === 'line-commuter-rail' || linePath === 'commuter-rail') && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have these as consts
somewhere?
@@ -21,8 +21,10 @@ export const GobbleDataNotice: React.FC = () => { | |||
const isEndDateAfterBusMaxDay = endDate !== undefined && dayjs(endDate).isAfter(BUS_MAX_DAY); | |||
|
|||
if ( | |||
(line === 'line-bus' || linePath === 'bus') && | |||
(isStartDateAfterBusMaxDay || isEndDateAfterBusMaxDay) | |||
((line === 'line-bus' || linePath === 'bus') && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more const
Motivation
Subset of #898 that adds ridership to the dashboard
Changes
Testing Instructions
Test in beta today