Skip to content

Commit bd932e4

Browse files
committed
Use RouteComponentProps types
1 parent b89f663 commit bd932e4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/app/src/app/pages/Search/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from '@codesandbox/common/lib/utils/config';
66
import MaxWidth from '@codesandbox/common/lib/components/flex/MaxWidth';
77
import Margin from '@codesandbox/common/lib/components/spacing/Margin';
8-
import { History, Location } from 'history';
8+
import { RouteComponentProps } from 'react-router-dom';
99
import qs from 'qs';
1010
import React, {
1111
FunctionComponent,
@@ -39,10 +39,7 @@ const createURL = state => `?${qs.stringify(state)}`;
3939
const searchStateToUrl = (location, searchState) =>
4040
searchState ? `${location.pathname}${createURL(searchState)}` : '';
4141

42-
type Props = {
43-
history: History;
44-
location: Location;
45-
};
42+
type Props = RouteComponentProps;
4643
const Search: FunctionComponent<Props> = ({ history, location }) => {
4744
const {
4845
actions: { searchMounted },

0 commit comments

Comments
 (0)