Skip to content

Commit

Permalink
Rename generic event
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Oct 6, 2023
1 parent 4b53151 commit af8e8c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions resources/views/livewire/servers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class="w-full max-w-xs h-9 relative"
}
)
Livewire.on('chart-update', ({ servers }) => {
Livewire.on('servers-chart-update', ({ servers }) => {
// TODO: Figure out how to destroy the Alpine instance and remove this listener.
if (chart === undefined) {
Expand Down Expand Up @@ -220,7 +220,7 @@ class="w-full max-w-xs h-9 relative"
}
)
Livewire.on('chart-update', ({ servers }) => {
Livewire.on('servers-chart-update', ({ servers }) => {
// TODO: Figure out how to destroy the Alpine instance and remove this listener.
if (chart === undefined) {
Expand Down Expand Up @@ -300,7 +300,7 @@ class="w-full max-w-xs h-9 relative"
}
)
Livewire.on('chart-update', ({ servers }) => {
Livewire.on('servers-chart-update', ({ servers }) => {
// TODO: Figure out how to destroy the Alpine instance and remove this listener.
const storage = servers['{{ $server->slug }}']?.storage?.find(storage => storage.directory === '{{ $storage->directory }}')
Expand Down
2 changes: 1 addition & 1 deletion src/Livewire/Servers.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function render(callable $query): Renderable
$servers = $query($this->periodAsInterval());

if (request()->hasHeader('X-Livewire')) {
$this->dispatch('chart-update', servers: $servers);
$this->dispatch('servers-chart-update', servers: $servers);
}

return View::make('pulse::livewire.servers', [
Expand Down

0 comments on commit af8e8c9

Please sign in to comment.