diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/lib/history.tsx | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gui/src/renderer/lib/history.tsx b/gui/src/renderer/lib/history.tsx index 9a0205b382..486093cca0 100644 --- a/gui/src/renderer/lib/history.tsx +++ b/gui/src/renderer/lib/history.tsx @@ -1,6 +1,5 @@ import { Action, History as OriginalHistory, Location, LocationDescriptorObject } from 'history'; -import React from 'react'; -import { RouteComponentProps, useHistory as useReactRouterHistory, withRouter } from 'react-router'; +import { useHistory as useReactRouterHistory } from 'react-router'; import { IHistoryObject } from '../../shared/ipc-types'; import { GeneratedRoutePath, RoutePath } from './routes'; @@ -220,15 +219,3 @@ export default class History { export function useHistory(): History { return useReactRouterHistory() as History; } - -export interface IHistoryProps { - history: History; -} - -export function withHistory<P>(BaseComponent: React.ComponentType<P & IHistoryProps>) { - return withRouter((props: P & RouteComponentProps) => { - const history = props.history as History; - const mergedProps = ({ ...props, history } as unknown) as P & IHistoryProps; - return <BaseComponent {...mergedProps} />; - }); -} |
