mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
pint and some mod data changes
This commit is contained in:
parent
f443364721
commit
f16b3fe497
@ -27,12 +27,13 @@ class Profile extends Component
|
|||||||
$this->followers = $this->user->followers;
|
$this->followers = $this->user->followers;
|
||||||
$this->following = $this->user->following;
|
$this->following = $this->user->following;
|
||||||
|
|
||||||
$mods = $this->user->mods()->paginate(6);
|
$mods = $this->user->mods()->withWhereHas('latestVersion')->paginate(6);
|
||||||
|
|
||||||
return view('livewire.user.profile', compact('mods'));
|
return view('livewire.user.profile', compact('mods'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSection(string $name) {
|
public function setSection(string $name)
|
||||||
|
{
|
||||||
$this->section = $name;
|
$this->section = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ namespace App\Livewire;
|
|||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
use Livewire\Attributes\Reactive;
|
use Livewire\Attributes\Reactive;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
@ -41,8 +40,7 @@ class UserStack extends Component
|
|||||||
|
|
||||||
public function closeDialog()
|
public function closeDialog()
|
||||||
{
|
{
|
||||||
if ($this->refreshNeeded)
|
if ($this->refreshNeeded) {
|
||||||
{
|
|
||||||
$this->dispatch('refreshNeeded');
|
$this->dispatch('refreshNeeded');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ class UserFactory extends Factory
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the user's default state.
|
* Define the user's default state.
|
||||||
|
*
|
||||||
* @throws RandomException
|
* @throws RandomException
|
||||||
*/
|
*/
|
||||||
public function definition(): array
|
public function definition(): array
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="m-4 grid grid-cols-1 gap-6 lg:grid-cols-2">
|
<div class="m-4 grid grid-cols-1 gap-6 lg:grid-cols-2">
|
||||||
@foreach($mods as $mod)
|
@foreach($mods as $mod)
|
||||||
<x-mod-card :mod="$mod"/>
|
<x-mod-card :mod="$mod" versionScope="latestVersion" />
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@break
|
@break
|
||||||
|
@ -31,7 +31,6 @@ test('confirm following a user cannot be done twice', function () {
|
|||||||
$user1->follow($user2);
|
$user1->follow($user2);
|
||||||
$user1->follow($user2);
|
$user1->follow($user2);
|
||||||
|
|
||||||
|
|
||||||
$this->assertCount(1, $user1->following);
|
$this->assertCount(1, $user1->following);
|
||||||
$this->assertCount(1, $user2->followers);
|
$this->assertCount(1, $user2->followers);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user