Skip to content

Commit bad57d8

Browse files
feat:[lar-137] change count and indicator component to volt component
1 parent 4410e4c commit bad57d8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

resources/views/livewire/notification-count.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
33
declare(strict_types=1);
44
5-
use function Livewire\Volt\{on};
65
use Illuminate\Support\Facades\Auth;
76
7+
use function Livewire\Volt\{on};
88
use function Livewire\Volt\{state};
99
1010
state(['count' => Auth::user()->unreadNotifications()->count()]);
1111
12-
on(['NotificationMarkedAsRead' => function (int $count) {
13-
return $count;
14-
}]);
12+
on(['NotificationMarkedAsRead' => fn (int $count) => $count );
1513
1614
?>
1715

resources/views/livewire/notification-indicator.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
33
declare(strict_types=1);
44
5-
use function Livewire\Volt\{on};
65
use Illuminate\Support\Facades\Auth;
76
7+
use function Livewire\Volt\{on};
88
use function Livewire\Volt\{state};
99
1010
state(['hasNotification' => Auth::user()->unreadNotifications()->count() > 0 ]);
1111
12-
on(['NotificationMarkedAsRead' => function (int $count) {
13-
return $count > 0 ;
14-
}]);
12+
on(['NotificationMarkedAsRead' => fn (int $count) => $count > 0]);
1513
1614
?>
1715

0 commit comments

Comments
 (0)