From 93f0f33e84c8ec4bc79fe55444eb8ddb3ab764b7 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 13 May 2021 21:15:11 +0100 Subject: [PATCH] Fixed: restoring scroll position when going back to index page --- frontend/src/Author/Details/AuthorDetails.js | 5 ++++- .../Author/Index/Banners/AuthorIndexBanners.js | 8 +++++++- .../Index/Overview/AuthorIndexOverviews.js | 7 ++++++- .../Author/Index/Posters/AuthorIndexPosters.js | 8 +++++++- .../src/Author/Index/Table/AuthorIndexTable.js | 5 ++++- frontend/src/Components/Link/Link.js | 16 ++++++++++++++-- .../src/Components/Page/Header/PageHeader.js | 5 ++++- frontend/src/Components/Table/VirtualTable.js | 7 +++++++ frontend/src/Components/withScrollPosition.js | 2 +- 9 files changed, 54 insertions(+), 9 deletions(-) diff --git a/frontend/src/Author/Details/AuthorDetails.js b/frontend/src/Author/Details/AuthorDetails.js index 2a6e743fc..9db384f17 100644 --- a/frontend/src/Author/Details/AuthorDetails.js +++ b/frontend/src/Author/Details/AuthorDetails.js @@ -268,7 +268,10 @@ class AuthorDetails extends Component { name={icons.ARROW_UP} size={30} title={translate('GoToAuthorListing')} - to={'/'} + to={{ + pathname: '/', + state: { restoreScrollPosition: true } + }} />