Skip to content

Commit 4f23139

Browse files
committed
replace Routecontext with useRouter
1 parent 323eb9e commit 4f23139

3 files changed

Lines changed: 2 additions & 47 deletions

File tree

app/component/trafficnow/RouteBadges.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import React, { useMemo } from 'react';
33
import PropTypes from 'prop-types';
44
import cx from 'classnames';
5+
import { useRouter } from 'found';
56
import { entityShape } from '../../util/shapes';
6-
import { useRoute } from '../../util/RouteContext';
77
import { useConfigContext } from '../../configurations/ConfigContext';
88
import { AlertEntityType } from '../../constants';
99
import { groupEntitiesByMode } from './utils';
@@ -15,7 +15,7 @@ const STOP_SIGN_ICON_SCALE = 0.5;
1515
const NORMAL_ICON_SCALE = 1;
1616

1717
export default function RouteBadges({ entities: rawEntities }) {
18-
const { match } = useRoute();
18+
const { match } = useRouter();
1919
const config = useConfigContext();
2020
const { selectedFilters } = useFilterContext();
2121

app/routes.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030

3131
import getStopRoutes from './stopRoutes';
3232
import routeRoutes from './routeRoutes';
33-
import { withRouteContext } from './util/RouteContext';
3433

3534
export const historyMiddlewares = [queryMiddleware];
3635

@@ -355,7 +354,6 @@ export default config => {
355354
/* webpackChunkName: "trafficnow" */ './component/trafficnow/TrafficNow'
356355
).then(getDefault)
357356
}
358-
render={withRouteContext()}
359357
/>
360358
)}
361359
<Route

app/util/RouteContext.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)