Implement "scroll to top" for profile tabs (#1973)

* Hook up scroll to top handlers

* Scroll and invalidate Feeds/Lists

* Fix index calc due to conditional tabs

* Reorder lines for clarity
This commit is contained in:
dan 2023-11-22 04:25:11 +00:00 committed by GitHub
parent 3de1d556a9
commit 08333002cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 275 additions and 181 deletions

View file

@ -143,8 +143,7 @@ function ProfileListScreenLoaded({
(index: number) => {
if (index === 0) {
feedSectionRef.current?.scrollToTop()
}
if (index === 1) {
} else if (index === 1) {
aboutSectionRef.current?.scrollToTop()
}
},