fix scroll restoration
This commit is contained in:
parent
bbcff99fb3
commit
8e4671e05a
2 changed files with 13 additions and 4 deletions
|
@ -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 (
|
||||
<Switch>
|
||||
|
|
|
@ -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"
|
||||
}
|
Loading…
Reference in a new issue