diff --git a/app/Livewire/Pages/Articles/Index.php b/app/Livewire/Pages/Articles/Index.php index 150d5ed7..a78454c4 100644 --- a/app/Livewire/Pages/Articles/Index.php +++ b/app/Livewire/Pages/Articles/Index.php @@ -6,15 +6,17 @@ use App\Models\Article; use App\Models\Tag; -use App\Traits\WithInfiniteScroll; use App\Traits\WithLocale; use Illuminate\Contracts\View\View; use Livewire\Component; +use Livewire\WithoutUrlPagination; +use Livewire\WithPagination; final class Index extends Component { - use WithInfiniteScroll; use WithLocale; + use WithoutUrlPagination; + use WithPagination; public function mount(): void { @@ -31,7 +33,7 @@ public function render(): View ->published() ->notPinned() ->forLocale($this->locale) - ->paginate($this->perPage), + ->simplePaginate(20), 'tags' => Tag::query()->whereHas('articles', function ($query): void { $query->published(); })->orderBy('name')->get(), diff --git a/resources/views/livewire/pages/articles/index.blade.php b/resources/views/livewire/pages/articles/index.blade.php index ed251a70..4c96002a 100644 --- a/resources/views/livewire/pages/articles/index.blade.php +++ b/resources/views/livewire/pages/articles/index.blade.php @@ -119,11 +119,8 @@ class="flex size-8 items-center justify-center rounded-full text-gray-400 transi @endforeach - @if ($articles->hasMorePages()) -
-
- @endif + - {{ __('global.loading') }} -