forked from eatvio/eatvio-infra
refactor code style and code review
This commit is contained in:
@@ -5,9 +5,9 @@ namespace App\Livewire\Chat;
|
||||
use App\Events\ChatMessageUpdated;
|
||||
use App\Models\Chat;
|
||||
use App\Models\User;
|
||||
use Livewire\Component;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use Livewire\Component;
|
||||
|
||||
class MessageWindow extends Component
|
||||
{
|
||||
@@ -21,7 +21,7 @@ class MessageWindow extends Component
|
||||
|
||||
public User|null $recipientUser = null;
|
||||
|
||||
public string $chanId;
|
||||
public string $chanId;
|
||||
|
||||
public User $curUser;
|
||||
|
||||
@@ -43,7 +43,7 @@ class MessageWindow extends Component
|
||||
->prepend($message);
|
||||
}
|
||||
|
||||
public function updateRecipientId(int $id = null): void
|
||||
public function updateRecipientId(?int $id = null): void
|
||||
{
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class MessageWindow extends Component
|
||||
}
|
||||
|
||||
// FIXME
|
||||
public function mount(int $recipientUserId = null): void
|
||||
public function mount(?int $recipientUserId = null): void
|
||||
{
|
||||
$this->recipientUserId = $recipientUserId;
|
||||
$this->recipientUser = User::find($recipientUserId);
|
||||
|
||||
Reference in New Issue
Block a user