Skip to content

Commit

Permalink
fix ridership chart config
Browse files Browse the repository at this point in the history
  • Loading branch information
skaplan-dev committed Jul 9, 2023
1 parent 6733fc3 commit ce2a62a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/ridership/RidershipWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import dayjs from 'dayjs';
import { useDelimitatedRoute } from '../../common/utils/router';
import { ChartPlaceHolder } from '../../common/components/graphics/ChartPlaceHolder';
import { WidgetDiv } from '../../common/components/widgets/WidgetDiv';
import { OVERVIEW_OPTIONS, TODAY_STRING } from '../../common/constants/dates';
import { SPEED_RANGE_PARAM_MAP } from '../speed/constants/speeds';
import { getSpeedGraphConfig } from '../speed/constants/speeds';
import { HomescreenWidgetTitle } from '../dashboard/HomescreenWidgetTitle';
import { useRidershipData } from '../../common/api/hooks/ridership';
import { RIDERSHIP_KEYS } from '../../common/types/lines';
Expand All @@ -13,7 +14,7 @@ export const RidershipWidget: React.FC = () => {
const { line, query } = useDelimitatedRoute();
const { startDate } = OVERVIEW_OPTIONS[query.view ?? 'year'];
const endDate = TODAY_STRING;
const config = SPEED_RANGE_PARAM_MAP.week;
const config = getSpeedGraphConfig(dayjs(startDate), dayjs(endDate));
const lineId = query.busRoute
? `line-${query.busRoute.replaceAll('/', '')}`
: RIDERSHIP_KEYS[line ?? ''];
Expand Down

0 comments on commit ce2a62a

Please sign in to comment.