import React from 'react'; import { createDevTools } from '@redux-devtools/core'; import { InspectorMonitor, base16Themes, Tab, } from '@redux-devtools/inspector-monitor'; import { DockMonitor } from '@redux-devtools/dock-monitor'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import getOptions from './getOptions'; import { TestTab } from '@redux-devtools/inspector-monitor-test-tab'; import { Action } from 'redux'; export const getDevTools = (location: { search: string }) => createDevTools( [ { name: 'Test', component: TestTab, }, ...defaultTabs, ] as Tab>[] } /> ); const UnconnectedDevTools = ({ location }: RouteComponentProps) => { const DevTools = getDevTools(location); return ; }; export const ConnectedDevTools = withRouter(UnconnectedDevTools);