import React from 'react' import {connect} from 'react-redux' /* * Quick links: * Jump to anchors for: not exported, filtered and received */ const QuickLinks = function(props) { const isLoading = props.routes.received.loading || props.routes.filtered.loading; // Do no display some dangleing "go to:" text if (isLoading) { return null; } // Handle special not exported: Default just works like // filtered or received. When loaded on demand, we override // this. let showNotExported = (!props.routes.notExported.loading && props.routes.notExported.totalResults > 0); if (props.loadNotExportedOnDemand) { // Show the link when nothing else is loading anymore showNotExported = !isLoading; } return (
Go to:
); } export default connect( (state) => ({ "loadNotExportedOnDemand": state.config.noexport_load_on_demand, }) )(QuickLinks);