mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-20 21:08:52 +01:00
Fix scroll direction stopped working
s/up/start s/down/end
This commit is contained in:
parent
e2139399ee
commit
0dcccd1e57
1 changed files with 3 additions and 3 deletions
|
@ -258,7 +258,7 @@ function Home({ hidden }) {
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
hidden={scrollDirection === 'down' && !nearReachStart}
|
hidden={scrollDirection === 'end' && !nearReachStart}
|
||||||
type="button"
|
type="button"
|
||||||
id="compose-button"
|
id="compose-button"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
@ -277,7 +277,7 @@ function Home({ hidden }) {
|
||||||
</button>
|
</button>
|
||||||
<div class="timeline-deck deck">
|
<div class="timeline-deck deck">
|
||||||
<header
|
<header
|
||||||
hidden={scrollDirection === 'down' && !nearReachStart}
|
hidden={scrollDirection === 'end' && !nearReachStart}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
scrollableRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
|
scrollableRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
}}
|
}}
|
||||||
|
@ -315,7 +315,7 @@ function Home({ hidden }) {
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{snapStates.homeNew.length > 0 &&
|
{snapStates.homeNew.length > 0 &&
|
||||||
scrollDirection === 'up' &&
|
scrollDirection === 'start' &&
|
||||||
!nearReachStart &&
|
!nearReachStart &&
|
||||||
!nearReachEnd && (
|
!nearReachEnd && (
|
||||||
<button
|
<button
|
||||||
|
|
Loading…
Reference in a new issue