diff --git a/app/Livewire/Plan/Like/AnnouncementDetails.php b/app/Livewire/Plan/Like/AnnouncementDetails.php index 6f6530d..8fcf9da 100755 --- a/app/Livewire/Plan/Like/AnnouncementDetails.php +++ b/app/Livewire/Plan/Like/AnnouncementDetails.php @@ -20,7 +20,7 @@ class AnnouncementDetails extends Component return view('livewire.plan.like.announcement-details'); } - #[On('liked')] + #[On('liked-details')] public function like(): void { if ($this->plan->isLiked()) { @@ -32,6 +32,6 @@ class AnnouncementDetails extends Component ]); } - $this->dispatch('liked')->to('plan.like-count'); + $this->dispatch('liked-details')->to('plan.like-count'); } } diff --git a/app/Livewire/Plan/Like/AnnouncementFooter.php b/app/Livewire/Plan/Like/AnnouncementFooter.php index a402858..54ad2ba 100755 --- a/app/Livewire/Plan/Like/AnnouncementFooter.php +++ b/app/Livewire/Plan/Like/AnnouncementFooter.php @@ -20,7 +20,7 @@ class AnnouncementFooter extends Component return view('livewire.plan.like.announcement-footer'); } - #[On('liked')] + #[On('liked-footer')] public function like(): void { if ($this->plan->isLiked()) { @@ -32,6 +32,6 @@ class AnnouncementFooter extends Component ]); } - $this->dispatch('liked')->to('plan.like-count'); + $this->dispatch('liked-footer')->to('plan.like-count'); } } diff --git a/app/Livewire/Plan/LikeCount.php b/app/Livewire/Plan/LikeCount.php index 90b756a..ad10da7 100755 --- a/app/Livewire/Plan/LikeCount.php +++ b/app/Livewire/Plan/LikeCount.php @@ -10,7 +10,7 @@ class LikeCount extends Component { public Plan $plan; - protected $listeners = ['liked' => '$refresh']; + protected $listeners = ['liked-details' => '$refresh', 'liked-footer' => '$refresh']; public function mount(Plan $plan) { @@ -19,8 +19,8 @@ class LikeCount extends Component public function render() { - $this->dispatch('liked'); - + $this->dispatch('liked-details'); + $this->dispatch('liked-footer'); return view( 'livewire.plan.like-count', [