fix user-stack showing wrong name in dialog title

This commit is contained in:
IsWaffle 2024-09-11 09:24:43 -04:00
parent affb0d11f7
commit 90aeecc6d8
3 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,8 @@ class UserStack extends Component
#[Reactive]
public $users;
public string $parentUserName;
public $authFollowingIds = [];
public string $label = 'Users';

View File

@ -37,7 +37,7 @@
{{-- view all dialog --}}
<x-dialog-modal wire:model.live="viewAll">
<x-slot name="title">
<h2 class="text-2xl">{{$user->name}}'s {{$label}}</h2>
<h2 class="text-2xl">{{$parentUserName}}'s {{$label}}</h2>
</x-slot>
<x-slot name="content">

View File

@ -123,12 +123,12 @@
@endswitch
</div>
</div>
<div class="flex flex-col justify-center items-center">
<div class="flex flex-col justify-top items-center">
<div class="flex w-full max-w-sm">
<livewire:user-stack :label="__('Followers')" :users="$followers"/>
<livewire:user-stack :parentUserName="$user->name" :label="__('Followers')" :users="$followers"/>
</div>
<div class="flex w-full max-w-sm">
<livewire:user-stack :label="__('Following')" :users="$following"/>
<livewire:user-stack :parentUserName="$user->name" :label="__('Following')" :users="$following"/>
</div>
</div>
</div>