Skip to content

Commit

Permalink
frontend: Fix search results display
Browse files Browse the repository at this point in the history
  • Loading branch information
DerouineauNicolas committed May 27, 2024
1 parent 5cd35c2 commit 0c2fad3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions frontend/src/components/Carousels/VideoCarrouselSlick.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Searchbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Searchbar(props) {

const handleSubmit = (event) => {
event.preventDefault();
props.handleFormSubmit(this.state.term);
props.handleFormSubmit(event.target.value);
};


Expand Down

0 comments on commit 0c2fad3

Please sign in to comment.