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

@ -20,7 +20,7 @@ interface ScrollButtonsProps {
}
const ScrollButtons: FC<ScrollButtonsProps> = ({ scrollerFactoryRef, scrollState }) => {
const [localeScrollPos, SetLocaleScrollPos] = useState<number>(0);
const [localeScrollPos, setLocaleScrollPos] = useState<number>(0);
const scrollButtonsRef = useRef<HTMLDivElement>(null);
const scrollToPosition = useCallback((pos: number, immediate: boolean) => {
@ -54,7 +54,7 @@ const ScrollButtons: FC<ScrollButtonsProps> = ({ scrollerFactoryRef, scrollState
if (globalize.getIsElementRTL(scrollButtonsRef.current)) {
localeAwarePos *= -1;
}
SetLocaleScrollPos(localeAwarePos);
setLocaleScrollPos(localeAwarePos);
}, [scrollState.scrollPos]);
return (