e.button === 1 && closeTab(source)}
onContextMenu={e => this.onTabContextMenu(e, sourceId)}
title={getFileURL(source)}
>
["file", "javascript"].includes(icon)}
/>
{getTruncatedFileName(source)}
{path && {`../${path}/..`}}
);
}
}
const mapStateToProps = (state, { source }) => {
const selectedSource = getSelectedSource(state);
return {
tabSources: getSourcesForTabs(state),
selectedSource: selectedSource,
activeSearch: getActiveSearch(state)
};
};
export default connect(
mapStateToProps,
{
selectSource: actions.selectSource,
closeTab: actions.closeTab,
closeTabs: actions.closeTabs,
togglePrettyPrint: actions.togglePrettyPrint,
showSource: actions.showSource
}
)(Tab);