diff --git a/app/Livewire/Mod/Listing.php b/app/Livewire/Mod/Listing.php index 422ad0c..eeba87a 100644 --- a/app/Livewire/Mod/Listing.php +++ b/app/Livewire/Mod/Listing.php @@ -29,6 +29,9 @@ class Listing extends Component #[Url] public string $order = 'created'; + #[Url] + public int $resultsPerPage = 12; + /** * The SPT versions filter value. */ @@ -82,7 +85,7 @@ class Listing extends Component 'order' => $this->order, 'sptVersions' => $this->sptVersions, ]; - $mods = (new ModFilter($filters))->apply()->paginate(16); + $mods = (new ModFilter($filters))->apply()->paginate($this->resultsPerPage); $this->redirectOutOfBoundsPage($mods); diff --git a/resources/views/components/filter-sort-menu-item.blade.php b/resources/views/components/filter-menu-item.blade.php similarity index 57% rename from resources/views/components/filter-sort-menu-item.blade.php rename to resources/views/components/filter-menu-item.blade.php index c64e207..b933a8d 100644 --- a/resources/views/components/filter-sort-menu-item.blade.php +++ b/resources/views/components/filter-menu-item.blade.php @@ -1,8 +1,8 @@ -@props(['order', 'currentOrder']) +@props(['filterName', 'filter', 'currentFilter']) - {{ $slot }} diff --git a/resources/views/livewire/mod/listing.blade.php b/resources/views/livewire/mod/listing.blade.php index 10dd0bc..5da9d3b 100644 --- a/resources/views/livewire/mod/listing.blade.php +++ b/resources/views/livewire/mod/listing.blade.php @@ -99,7 +99,38 @@