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