Skip to content

Commit

Permalink
Fixed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornweb committed Mar 18, 2022
1 parent 96f8520 commit 20eca8c
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions react/filmapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const App = () => {
setMovies(data.Search);
}

useEffect(() => {
searchMovies("Batman");
}, []);

return (
<div className='app'>
Expand All @@ -40,25 +43,24 @@ const App = () => {
alt='search'
onClick={() => searchMovies(searchTerm)}
/>
{
movies?.length > 0
? (
<div className='container'>
{movies.map((movie) => (
<MovieCard movie={movie} />
))}
</div>
</div>
{movies?.length > 0
? (
<div className='container'>
{movies.map((movie) => (
<MovieCard movie={movie} />
))}
</div>

) :
(
<div className='empty'>
<h2>No Film Found</h2>
</div>
) :
(
<div className='empty'>
<h2>No Film Found</h2>
</div>

)
}
)
}

</div>

</div>

Expand Down

0 comments on commit 20eca8c

Please sign in to comment.