mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
apply suggestion
This commit is contained in:
parent
62a9034f5b
commit
72cbd37182
5 changed files with 41 additions and 23 deletions
|
@ -32,7 +32,7 @@ const Scroller: FC<ScrollerProps> = ({
|
|||
isAllowNativeSmoothScrollEnabled,
|
||||
children
|
||||
}) => {
|
||||
const [showControls, SetShowControls] = useState(false);
|
||||
const [showControls, setShowControls] = useState(false);
|
||||
const [scrollState, setScrollState] = useState({
|
||||
scrollSize: 0,
|
||||
scrollPos: 0,
|
||||
|
@ -196,7 +196,7 @@ const Scroller: FC<ScrollerProps> = ({
|
|||
capture: false,
|
||||
passive: true
|
||||
});
|
||||
SetShowControls(true);
|
||||
setShowControls(true);
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
@ -229,12 +229,12 @@ const Scroller: FC<ScrollerProps> = ({
|
|||
return (
|
||||
<>
|
||||
{
|
||||
showControls && scrollState.scrollWidth > scrollState.scrollSize + 20 ?
|
||||
showControls && scrollState.scrollWidth > scrollState.scrollSize + 20 &&
|
||||
<ScrollButtons
|
||||
scrollRef={scrollRef}
|
||||
scrollerFactoryRef={scrollerFactoryRef}
|
||||
scrollState={scrollState}
|
||||
/> : null
|
||||
/>
|
||||
}
|
||||
|
||||
<div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue