import React from 'react'; import { connect } from 'react-redux'; import { createDevTools } from '@redux-devtools/core'; import InspectorMonitor, { base16Themes, Tab, } from 'redux-devtools-inspector-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; import { Location } from 'history'; import getOptions from './getOptions'; import TestGenerator from '../../../src'; import { DemoAppState } from './reducers'; import { Action } from 'redux'; export const getDevTools = (location: { search: string }) => createDevTools( [ { name: 'Test', component: TestGenerator, }, ...defaultTabs, ] as Tab>[] } /> ); const UnconnectedDevTools = ({ location }: { location: Location }) => { const DevTools = getDevTools(location); return ; }; const mapStateToProps = (state: DemoAppState) => ({ location: state.router.location, }); export const ConnectedDevTools = connect(mapStateToProps)(UnconnectedDevTools);