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
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue