File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,17 @@ const Home = () => {
1111 const [ videoUrls , setVideoUrls ] = useState ( [ ] ) ;
1212 const [ livestreams , setLivestreams ] = useState ( [ ] ) ; // State lưu danh sách livestreams
1313 const [ indexs , setIndexs ] = useState ( [ ] ) ;
14-
14+ const UserId = localStorage . getItem ( 'userToken' ) ;
1515 const start = 4 ;
1616
1717 useEffect ( ( ) => {
1818 // Fetch video IDs and details
1919 const fetchVideoIds = async ( ) => {
2020 try {
21- const response = await fetch ( `${ process . env . REACT_APP_API_URL } /video/listIdThumbnail` ) ;
21+ // const response = await fetch(`${process.env.REACT_APP_API_URL}/video/listIdThumbnail`);
22+ // const response = await fetch(`${process.env.REACT_APP_API_URL}/video/getThumbnailsByUserGenres/${UserId}`);
23+ const response = await fetch ( `${ process . env . REACT_APP_API_URL } /video/getThumbnailsByUserGenres2/${ UserId } ` ) ;
24+
2225 if ( ! response . ok ) throw new Error ( 'Failed to fetch video ids' ) ;
2326 const ids = await response . json ( ) ;
2427 setVideoIds ( ids ) ;
@@ -81,7 +84,7 @@ const Home = () => {
8184
8285 < div className = 'flex items-center my-3 pl-[20px] pt-[20px] w-3/5 text-black font-bold' >
8386 < IoMdMenu className = 'cursor-pointer size-[25px]' />
84- < p className = 'ml-[10px] text-[#474747] text-[20px]' > Top video tiêu biểu </ p >
87+ < p className = 'ml-[10px] text-[#474747] text-[20px]' > Video dành cho bạn </ p >
8588 </ div >
8689
8790 < div className = 'flex relative ml-2 flex-wrap' >
You can’t perform that action at this time.
0 commit comments