1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

apply suggestion

This commit is contained in:
grafixeyehero 2022-12-15 22:54:58 +03:00
parent 62a9034f5b
commit 72cbd37182
5 changed files with 41 additions and 23 deletions

View file

@ -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