diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx index a09cd464a5..afd09a1ef1 100644 --- a/static/js/Misc.jsx +++ b/static/js/Misc.jsx @@ -1347,50 +1347,6 @@ MenuButton.propTypes = { }; -// class NavigateBackButton extends Component { -// onClick(e) { -// e.preventDefault(); -// window.history.back(); -// } - -// render() { -// return ( -// -// {/* Font Awesome chevron-left icon */} -// -// ); -// } -// } - -class NavigateBackButton extends Component { - onClick(e) { - e.preventDefault(); - let newCurrentRef = this.props.currentRef; - - // Remove trailing numbers from currentRef - currentRef = newCurrentRef.replace(/\d+$/, ''); - - const currentRef = this.props.currentRef; - if (currentRef) { - window.location.href = `/${currentRef}?tab=contents`; - } - console.log("this is currentRef", currentRef) - } - - render() { - return ( - - - - ); - } -} - -NavigateBackButton.propTypes = { - currentRef: PropTypes.string -}; - - class CloseButton extends Component { onClick(e) { e.preventDefault(); @@ -3404,7 +3360,6 @@ export { ProfileListing, ProfilePic, ReaderMessage, - NavigateBackButton, CloseButton, DisplaySettingsButton, MenuButton, diff --git a/static/js/ReaderPanel.jsx b/static/js/ReaderPanel.jsx index 21e5575fa1..578b6019ce 100644 --- a/static/js/ReaderPanel.jsx +++ b/static/js/ReaderPanel.jsx @@ -33,7 +33,6 @@ import PublicCollectionsPage from './PublicCollectionsPage'; import TranslationsPage from './TranslationsPage'; import { TextColumnBannerChooser } from './TextColumnBanner'; import { - NavigateBackButton, CloseButton, MenuButton, DisplaySettingsButton, @@ -1442,7 +1441,7 @@ class ReaderControls extends Component { let leftControls = hideHeader || connectionsHeader ? null : (