diff --git a/react/filmapp/src/App.js b/react/filmapp/src/App.js index af49760..4a2b641 100644 --- a/react/filmapp/src/App.js +++ b/react/filmapp/src/App.js @@ -24,6 +24,9 @@ const App = () => { setMovies(data.Search); } + useEffect(() => { + searchMovies("Batman"); + }, []); return (
@@ -40,25 +43,24 @@ const App = () => { alt='search' onClick={() => searchMovies(searchTerm)} /> - { - movies?.length > 0 - ? ( -
- {movies.map((movie) => ( - - ))} -
+
+ {movies?.length > 0 + ? ( +
+ {movies.map((movie) => ( + + ))} +
- ) : - ( -
-

No Film Found

-
+ ) : + ( +
+

No Film Found

+
- ) - } + ) + } -