clear up naming

This commit is contained in:
Abdalrzag Eisa 2025-06-14 22:50:47 +03:00
parent f7f9e6a408
commit dfaba09ef2
No known key found for this signature in database
GPG key ID: 4CD5A78B36195BC8

View file

@ -13,7 +13,7 @@ type Props = {
className?: string;
seriesInfo: SeriesInfo;
metaItem: MetaItem;
currentlyPlayingVideoID: string;
selectedVideoID: string;
closeSideDrawer: () => void;
};
@ -76,10 +76,10 @@ const SideDrawer = memo(forwardRef<HTMLDivElement, Props>(({ seriesInfo, classNa
event.stopPropagation();
};
const currentlyPlayingVideoRef = useRef<HTMLDivElement>(null);
const selectedVideoRef = useRef<HTMLDivElement>(null);
const jumpToPlayingNow = () => {
const { current } = currentlyPlayingVideoRef;
const { current } = selectedVideoRef;
if (current) {
current.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
@ -130,7 +130,7 @@ const SideDrawer = memo(forwardRef<HTMLDivElement, Props>(({ seriesInfo, classNa
scheduled={video.scheduled}
onMarkVideoAsWatched={onMarkVideoAsWatched}
onMarkSeasonAsWatched={onMarkSeasonAsWatched}
ref={video.id === props.currentlyPlayingVideoID ? currentlyPlayingVideoRef : null}
ref={video.id === props.selectedVideoID ? selectedVideoRef : null}
/>
))}
</div>