mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Fix threshold for larger-than-viewport statuses
This commit is contained in:
parent
6ffc40fdf3
commit
3338c49c25
1 changed files with 2 additions and 2 deletions
|
@ -270,7 +270,7 @@ function StatusPage({ id }) {
|
|||
const onView = useDebouncedCallback(setHeroInView, 100);
|
||||
const heroPointer = useMemo(() => {
|
||||
// get top offset of heroStatus
|
||||
if (!heroStatusRef.current) return null;
|
||||
if (!heroStatusRef.current || heroInView) return null;
|
||||
const { top } = heroStatusRef.current.getBoundingClientRect();
|
||||
return top > 0 ? 'down' : 'up';
|
||||
}, [heroInView]);
|
||||
|
@ -358,7 +358,7 @@ function StatusPage({ id }) {
|
|||
} ${thread ? 'thread' : ''} ${isHero ? 'hero' : ''}`}
|
||||
>
|
||||
{isHero ? (
|
||||
<InView threshold={0.5} onChange={onView}>
|
||||
<InView threshold={0.25} onChange={onView}>
|
||||
<Status statusID={statusID} withinContext size="l" />
|
||||
</InView>
|
||||
) : (
|
||||
|
|
Loading…
Reference in a new issue