diff --git a/youtube/src/components/Comments.js b/youtube/src/components/Comments.js index abe676f..12bb834 100644 --- a/youtube/src/components/Comments.js +++ b/youtube/src/components/Comments.js @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import { useEffect } from 'react' const Comments = () => { diff --git a/youtube/src/components/Header.js b/youtube/src/components/Header.js index e3331a3..3553014 100644 --- a/youtube/src/components/Header.js +++ b/youtube/src/components/Header.js @@ -43,19 +43,6 @@ const Header = () => { },[searchQuery]); -/* -* key - i -* render the component -* useEffect(); -* start timer → make api call after 200 ms - -* key - ip -* destroy the component(useffect return method) -* re-render the component -* useEffect() -* start timer = make api call after 200 ms -*/ - return (
diff --git a/youtube/src/components/SideBar.js b/youtube/src/components/SideBar.js index 8a16f19..730f266 100644 --- a/youtube/src/components/SideBar.js +++ b/youtube/src/components/SideBar.js @@ -4,6 +4,7 @@ import { Link } from "react-router-dom"; const SideBar = () => { const sidebarVisible = useSelector(state => state.app.isMenuOpen); + return ( sidebarVisible ? (
diff --git a/youtube/src/components/Subscriptions.js b/youtube/src/components/Subscriptions.js index f67a75a..9ac0893 100644 --- a/youtube/src/components/Subscriptions.js +++ b/youtube/src/components/Subscriptions.js @@ -11,11 +11,12 @@ const Subscriptions = () => { useEffect(() => { getSubscription(); },[]) + return (
Channnel Page Here
- ) + ); } export default Subscriptions diff --git a/youtube/src/components/VideoListContainer.js b/youtube/src/components/VideoListContainer.js index 3eeaca7..0095d28 100644 --- a/youtube/src/components/VideoListContainer.js +++ b/youtube/src/components/VideoListContainer.js @@ -7,6 +7,7 @@ import VideoCard from "./VideoCard"; const VideoListContainer = () => { const dispatch = useDispatch(); const videData = useSelector(state => state.app.videoData); + const getVideos = async () => { console.log(YOUTUBE_VIDEO_API); const data = await fetch(YOUTUBE_VIDEO_API); @@ -22,7 +23,7 @@ const VideoListContainer = () => {
- ) + ); } export default VideoListContainer diff --git a/youtube/src/components/WatchPage.js b/youtube/src/components/WatchPage.js index 6e7ef17..6f0e7dd 100644 --- a/youtube/src/components/WatchPage.js +++ b/youtube/src/components/WatchPage.js @@ -13,17 +13,15 @@ const WatchPage = () => { }, []); return ( -
-
- -
- +
+
) }