From 8e4671e05ac896f9c662f9f9724ee19a511ef1e2 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 1 Oct 2019 01:17:23 -0400 Subject: [PATCH] fix scroll restoration --- src/ui/component/router/view.jsx | 7 +++++-- static/app-strings.json | 10 ++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ui/component/router/view.jsx b/src/ui/component/router/view.jsx index 6c87185e8..2b18ec38a 100644 --- a/src/ui/component/router/view.jsx +++ b/src/ui/component/router/view.jsx @@ -60,11 +60,14 @@ type Props = { }; function AppRouter(props: Props) { - const { currentScroll } = props; + const { + currentScroll, + location: { pathname }, + } = props; useEffect(() => { window.scrollTo(0, currentScroll); - }, [currentScroll]); + }, [currentScroll, pathname]); return ( diff --git a/static/app-strings.json b/static/app-strings.json index b9e7bb0be..bb64eb6c3 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -712,5 +712,11 @@ "Read More": "Read More", "Subscribers": "Subscribers", "Your password is saved in your OS keychain.": "Your password is saved in your OS keychain.", - "I want to type it manually": "I want to type it manually" -} + "I want to type it manually": "I want to type it manually", + "Enter a LBRY URL here or search for videos, music, games and more": "Enter a LBRY URL here or search for videos, music, games and more", + "discovery": "discovery", + "Multi-language support is brand new and incomplete. Switching your language may have unintended consequences, like glossolalia.": "Multi-language support is brand new and incomplete. Switching your language may have unintended consequences, like glossolalia.", + "This will add a Support button along side tipping. Similar to tips, supports help %discovery_link% but the LBC is returned to your wallet if revoked. Both also help secure your %vanity_names_link%.": "This will add a Support button along side tipping. Similar to tips, supports help %discovery_link% but the LBC is returned to your wallet if revoked. Both also help secure your %vanity_names_link%.", + "Save Password": "Save Password", + "Automatically unlock your wallet on startup": "Automatically unlock your wallet on startup" +} \ No newline at end of file