import React, { ReactNode } from 'react' import { connect, ConnectedProps } from 'react-redux' import { t } from 'ttag' import SavedRuns from './SavedRuns' import Layers from './Layers' import { selectTab } from '../actions/tabs' const connector = connect( ({ activeTab }: { activeTab: string }) => { return { activeTab } }, (dispatch: (action: any) => any) => { return { onSelect: (tab: string) => { dispatch(selectTab(tab)) }, } }, ) type SidebarProps = ConnectedProps & { aboutNode: ReactNode children: ReactNode } const Sidebar = ({ activeTab, aboutNode, children, onSelect }: SidebarProps) => (
{aboutNode}
{children}
) export default connector(Sidebar)