mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
Remove favorites count from profile page to have it not break on load
This commit is contained in:
parent
827d125639
commit
f64afa649a
2 changed files with 1 additions and 11 deletions
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace App\Livewire\Pages;
|
namespace App\Livewire\Pages;
|
||||||
|
|
||||||
use App\Models\Comment;
|
|
||||||
use App\Models\Post;
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
|
|
@ -13,11 +11,6 @@ class Profile extends Component
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
$favorite_posts = $this->user->favorites()->withType(Post::class)->count();
|
return view('livewire.pages.profile')->title($this->user->name);
|
||||||
$favorite_comments = $this->user->favorites()->withType(Comment::class)->count();
|
|
||||||
|
|
||||||
return view('livewire.pages.profile', [
|
|
||||||
'favorite_posts' => $favorite_posts, 'favorite_comments' => $favorite_comments
|
|
||||||
])->title($this->user->name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,6 @@
|
||||||
<span class="wa-heading-m">
|
<span class="wa-heading-m">
|
||||||
<wa-format-number value="{{ $user->posts->count() }}"></wa-format-number> {{ Str::plural('post', $user->posts->count()) }}
|
<wa-format-number value="{{ $user->posts->count() }}"></wa-format-number> {{ Str::plural('post', $user->posts->count()) }}
|
||||||
</span>
|
</span>
|
||||||
<span>
|
|
||||||
<wa-format-number value="{{ $favorite_posts }}"></wa-format-number> {{ Str::plural('favorite', $favorite_posts) }}
|
|
||||||
</span>
|
|
||||||
</wa-card>
|
</wa-card>
|
||||||
|
|
||||||
<wa-card>
|
<wa-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue