mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
Refac inline player scroll behaviour
This commit is contained in:
@@ -63,6 +63,9 @@ const EmbeddableVideoPlayer = ({ videoId }: EmbeddableVideoPlayerProps) => {
|
||||
|
||||
setVideoResponse(videoResponse);
|
||||
|
||||
const inlinePlayer = document.getElementById('inline-player');
|
||||
inlinePlayer?.scrollIntoView();
|
||||
|
||||
setRefresh(false);
|
||||
setLoading(false);
|
||||
})();
|
||||
@@ -88,7 +91,7 @@ const EmbeddableVideoPlayer = ({ videoId }: EmbeddableVideoPlayerProps) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="player-wrapper">
|
||||
<div id="inline-player" className="player-wrapper">
|
||||
<div className="video-player">
|
||||
{!loading && (
|
||||
<VideoPlayer
|
||||
|
||||
@@ -39,8 +39,6 @@ const VideoListItem = ({
|
||||
<a
|
||||
onClick={() => {
|
||||
setSearchParams({ videoId: video.youtube_id });
|
||||
|
||||
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
||||
}}
|
||||
>
|
||||
<div className={`video-thumb-wrap ${viewLayout}`}>
|
||||
|
||||
Reference in New Issue
Block a user