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
|
public function findMovies(MovieDbInterface $movie_db): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
logger()->info("finding movies");
|
||||||
//$movie = $movie_db->search($this->query, ["type" => "imdb"]);
|
//$movie = $movie_db->search($this->query, ["type" => "imdb"]);
|
||||||
$this->results = $movie_db->search($this->query, ["type" => "title"]);
|
$this->results = $movie_db->search($this->query, ["type" => "title"]);
|
||||||
|
logger()->info($this->results);
|
||||||
} catch (NotFoundHttpException $e) {
|
} catch (NotFoundHttpException $e) {
|
||||||
$this->addError('query', 'Movie not found');
|
$this->addError('query', 'Movie not found');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
Add Movie
|
Add Movie
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@if(!empty($filteredMovies))
|
@if(!$filteredMovies->isEmpty())
|
||||||
<ul class="grid grid-cols-2 sm:grid-cols-4 gap-5">
|
<ul class="grid grid-cols-2 sm:grid-cols-4 gap-5">
|
||||||
@foreach ($filteredMovies as $movie)
|
@foreach ($filteredMovies as $movie)
|
||||||
<li class="bg-gray-200">
|
<li class="bg-gray-200">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue