diff --git a/app/Livewire/Mod/Index.php b/app/Livewire/Mod/Index.php index f8d8b58..69cabb4 100644 --- a/app/Livewire/Mod/Index.php +++ b/app/Livewire/Mod/Index.php @@ -8,7 +8,6 @@ use Illuminate\Contracts\View\View; use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Facades\Cache; use Livewire\Attributes\Computed; -use Livewire\Attributes\Session; use Livewire\Attributes\Url; use Livewire\Component; use Livewire\WithPagination; @@ -21,28 +20,24 @@ class Index extends Component * The search query value. */ #[Url] - #[Session] public string $query = ''; /** * The sort order value. */ #[Url] - #[Session] public string $order = 'created'; /** * The SPT versions filter value. */ #[Url] - #[Session] public array $sptVersions = []; /** * The featured filter value. */ #[Url] - #[Session] public string $featured = 'include'; /** @@ -102,9 +97,6 @@ class Index extends Component $this->query = ''; $this->sptVersions = $this->getLatestMinorVersions()->pluck('version')->toArray(); $this->featured = 'include'; - - // Clear local storage - $this->dispatch('clear-filters'); } /** diff --git a/app/View/Components/ModListSection.php b/app/View/Components/ModListSection.php index d08350e..f9c257c 100644 --- a/app/View/Components/ModListSection.php +++ b/app/View/Components/ModListSection.php @@ -88,16 +88,19 @@ class ModListSection extends Component 'title' => __('Featured Mods'), 'mods' => $this->modsFeatured, 'versionScope' => 'latestVersion', + 'link' => '/mods?featured=only', ], [ 'title' => __('Newest Mods'), 'mods' => $this->modsLatest, 'versionScope' => 'latestVersion', + 'link' => '/mods', ], [ 'title' => __('Recently Updated Mods'), 'mods' => $this->modsUpdated, 'versionScope' => 'lastUpdatedVersion', + 'link' => '/mods?order=updated', ], ]; } diff --git a/resources/views/components/mod-list-section-partial.blade.php b/resources/views/components/mod-list-section-partial.blade.php index efbbc7a..21dc3f9 100644 --- a/resources/views/components/mod-list-section-partial.blade.php +++ b/resources/views/components/mod-list-section-partial.blade.php @@ -1,10 +1,6 @@ -@props(['mods', 'versionScope', 'title']) +@props(['mods', 'versionScope', 'title', 'link'])