diff --git a/frontend/src/components/Carousels/VideoCarrouselSlick.js b/frontend/src/components/Carousels/VideoCarrouselSlick.js index 8ed7566..7ed4da3 100644 --- a/frontend/src/components/Carousels/VideoCarrouselSlick.js +++ b/frontend/src/components/Carousels/VideoCarrouselSlick.js @@ -62,6 +62,12 @@ export default function VideoCarrouselSlick({ pager, videos, handleVideoSelect, } }, [refresh]); + useEffect(() => { + //This is used to update carrousels video from search results. + if(pager.videos) + setCarrouselVideos(pager.videos) + }, [pager]); + var settings = { dots: false, infinite: false, diff --git a/frontend/src/components/Searchbar.js b/frontend/src/components/Searchbar.js index 086efeb..e86294c 100644 --- a/frontend/src/components/Searchbar.js +++ b/frontend/src/components/Searchbar.js @@ -16,7 +16,7 @@ export default function Searchbar(props) { const handleSubmit = (event) => { event.preventDefault(); - props.handleFormSubmit(this.state.term); + props.handleFormSubmit(event.target.value); };