From da6e0c01e8792dcb9465c57de2204df39721ab36 Mon Sep 17 00:00:00 2001 From: aktmishra <105375224+aktmishra@users.noreply.github.com> Date: Tue, 21 Mar 2023 08:36:25 +0000 Subject: [PATCH] comment --- src/App.js | 2 ++ src/components/VideoList.js | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/App.js b/src/App.js index 67af208..bb22789 100644 --- a/src/App.js +++ b/src/App.js @@ -33,6 +33,8 @@ function App() { return videos; } } + + // const [videos, dispatch] = useReducer(videoReducer, videoDB); const [videos, dispatch] = useReducer(videoReducer, []); function editVideo(id) { diff --git a/src/components/VideoList.js b/src/components/VideoList.js index 408bbd1..cdfd8ab 100644 --- a/src/components/VideoList.js +++ b/src/components/VideoList.js @@ -10,11 +10,12 @@ function VideoList({editVideo}){ const videos = useVideos() const dispatch = useVideoDispatch(); - - async function handleClick (){ - const res = await axios.get(url); - console.log('getVideos', res.data) - dispatch({type:'LOAD',payload:res.data}) + + // const [videos, setVideos] = usestate([]); + // async function handleClick (){ + // const res = await axios.get(url); + // console.log('getVideos', res.data) + // setVideos(res.data); } useEffect(()=>{ @@ -48,7 +49,7 @@ function VideoList({editVideo}){ ))} - + {/* */} ) }