1
0
Fork 0

Fix scroll direction stopped working

s/up/start s/down/end
This commit is contained in:
Lim Chee Aun 2023-01-14 20:16:13 +08:00
parent e2139399ee
commit 0dcccd1e57

View file

@ -258,7 +258,7 @@ function Home({ hidden }) {
tabIndex="-1"
>
<button
hidden={scrollDirection === 'down' && !nearReachStart}
hidden={scrollDirection === 'end' && !nearReachStart}
type="button"
id="compose-button"
onClick={(e) => {
@ -277,7 +277,7 @@ function Home({ hidden }) {
</button>
<div class="timeline-deck deck">
<header
hidden={scrollDirection === 'down' && !nearReachStart}
hidden={scrollDirection === 'end' && !nearReachStart}
onClick={() => {
scrollableRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
}}
@ -315,7 +315,7 @@ function Home({ hidden }) {
</div>
</header>
{snapStates.homeNew.length > 0 &&
scrollDirection === 'up' &&
scrollDirection === 'start' &&
!nearReachStart &&
!nearReachEnd && (
<button