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