Fixed empty list bug
This commit is contained in:
parent
e3b6d302c6
commit
ff6c59329b
2 changed files with 3 additions and 1 deletions
|
|
@ -26,8 +26,10 @@ class SearchPanel extends Component
|
|||
public function findMovies(MovieDbInterface $movie_db): void
|
||||
{
|
||||
try {
|
||||
logger()->info("finding movies");
|
||||
//$movie = $movie_db->search($this->query, ["type" => "imdb"]);
|
||||
$this->results = $movie_db->search($this->query, ["type" => "title"]);
|
||||
logger()->info($this->results);
|
||||
} catch (NotFoundHttpException $e) {
|
||||
$this->addError('query', 'Movie not found');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
Add Movie
|
||||
</button>
|
||||
</div>
|
||||
@if(!empty($filteredMovies))
|
||||
@if(!$filteredMovies->isEmpty())
|
||||
<ul class="grid grid-cols-2 sm:grid-cols-4 gap-5">
|
||||
@foreach ($filteredMovies as $movie)
|
||||
<li class="bg-gray-200">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue