diff --git a/client/src/VideoRecommendations.jsx b/client/src/VideoRecommendations.jsx index 507dc97dfa..c18d07cd47 100644 --- a/client/src/VideoRecommendations.jsx +++ b/client/src/VideoRecommendations.jsx @@ -21,24 +21,35 @@ const VideoList = () => { }); }, []); + function changeYTLinkToEmbed(watchLink) { + const embedLink = watchLink.replace("watch?v=", "embed/"); + return embedLink; + } + return (
- {videos.map((videoData, i) => ( -
-
- + {videos.map((videoData, i) => { + const embededLink = changeYTLinkToEmbed(videoData.src); + return ( +
+
+ +
-
- ))} + ); + })}
); + () => { + return askxjsnj; + }; }; export default VideoList;