From 6e38cb5ded4649d90a914afd4ea81f507b2f9b91 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 26 Sep 2019 11:28:59 -0400 Subject: [PATCH] remove sort controls from library/publishes --- package.json | 2 +- src/ui/component/router/view.jsx | 10 +++------- src/ui/page/fileListDownloaded/view.jsx | 1 - src/ui/page/fileListPublished/view.jsx | 1 - yarn.lock | 4 ++-- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 44f445970..7c6ffe853 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "husky": "^0.14.3", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#f02c6b7a2719ceead03f1c45b4bbf26b2069a20e", + "lbry-redux": "lbryio/lbry-redux#64383d57873ce59dea9df7216ee6cf52c4e95dc6", "lbryinc": "lbryio/lbryinc#d250096a6fc5df16be4f82812ecce28d6e558b6e", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/src/ui/component/router/view.jsx b/src/ui/component/router/view.jsx index b1454a9ca..2bf080d8c 100644 --- a/src/ui/component/router/view.jsx +++ b/src/ui/component/router/view.jsx @@ -1,7 +1,7 @@ // @flow import * as PAGES from 'constants/pages'; import React, { useEffect } from 'react'; -import { Route, Redirect, Switch, withRouter } from 'react-router-dom'; +import { Route, Switch, withRouter } from 'react-router-dom'; import SettingsPage from 'page/settings'; import HelpPage from 'page/help'; import ReportPage from 'page/report'; @@ -35,15 +35,11 @@ type Props = { }; function AppRouter(props: Props) { - const { currentScroll, location } = props; - const { pathname, search } = location; - - // Don't update the scroll position if only the `page` param changes - const url = `${pathname}${search.replace(/&?\??page=\d+/, '')}`; + const { currentScroll } = props; useEffect(() => { window.scrollTo(0, currentScroll); - }, [currentScroll, url]); + }, [currentScroll]); return ( diff --git a/src/ui/page/fileListDownloaded/view.jsx b/src/ui/page/fileListDownloaded/view.jsx index 6a2f6d50f..0a3d2c029 100644 --- a/src/ui/page/fileListDownloaded/view.jsx +++ b/src/ui/page/fileListDownloaded/view.jsx @@ -24,7 +24,6 @@ function FileListDownloaded(props: Props) {
} /> diff --git a/yarn.lock b/yarn.lock index 64c92ea9f..e6685f724 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6894,9 +6894,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4: yargs "^13.2.2" zstd-codec "^0.1.1" -lbry-redux@lbryio/lbry-redux#f02c6b7a2719ceead03f1c45b4bbf26b2069a20e: +lbry-redux@lbryio/lbry-redux#64383d57873ce59dea9df7216ee6cf52c4e95dc6: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/f02c6b7a2719ceead03f1c45b4bbf26b2069a20e" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/64383d57873ce59dea9df7216ee6cf52c4e95dc6" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0"