import React, { FunctionComponent, RefObject } from 'react'; import { connect } from 'react-redux'; import ContentEditable from 'react-contenteditable'; import { browserInfoConfig } from '../browserConfig'; import { toggleBrowserNav } from '../browserActions'; import { ChrLocation } from '../browserState'; import { RootState } from 'src/rootReducer'; import { getBrowserNavOpened, getChrLocation } from '../browserSelectors'; import styles from './BrowserBar.scss'; import BrowserReset from '../browser-reset/BrowserReset'; type StateProps = { browserNavOpened: boolean; chrLocation: ChrLocation; }; type DispatchProps = { toggleBrowserNav: () => void; }; type OwnProps = { browserRef: RefObject; }; type BrowserBarProps = StateProps & DispatchProps & OwnProps; export const BrowserBar: FunctionComponent = ( props: BrowserBarProps ) => { const { navigator, reset } = browserInfoConfig; const [chrCode, chrStart, chrEnd] = props.chrLocation; const browserImageEl = props.browserRef.current as HTMLDivElement; return (
BRAC2
ENSG00000139618
84,793
protein coding
forward strand
-
); }; const mapStateToProps = (state: RootState): StateProps => ({ browserNavOpened: getBrowserNavOpened(state), chrLocation: getChrLocation(state) }); const mapDispatchToProps: DispatchProps = { toggleBrowserNav }; export default connect( mapStateToProps, mapDispatchToProps )(BrowserBar);