Skip to content

Commit

Permalink
Fix broken bus link (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte authored Apr 5, 2024
1 parent afc0ec8 commit 5bbd487
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/landing/LineButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import classNames from 'classnames';
import type { Line } from '../../common/types/lines';
import { lineColorBackground, lineColorBorder } from '../../common/styles/general';
import { LINE_OBJECTS } from '../../common/constants/lines';
import { BUS_DEFAULTS } from '../../common/state/defaults/dateDefaults';

interface LineButtonProps {
children: React.ReactNode;
Expand All @@ -15,7 +16,11 @@ export const LineButton: React.FC<LineButtonProps> = ({ children, line }) => {

return (
<Link
href={`/${lineObject.path}`}
href={
line === 'line-bus'
? `/${lineObject.path}?busRoute=1&date=${BUS_DEFAULTS.singleTripConfig.date}`
: `/${lineObject.path}`
}
className="group flex cursor-pointer flex-row items-center gap-x-8 gap-y-4 md:flex-col"
>
<div
Expand Down

0 comments on commit 5bbd487

Please sign in to comment.