Skip to content

Commit

Permalink
Fix in script for issuing notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
tony98ms authored Feb 14, 2024
1 parent a2e3189 commit a9238e5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions resources/views/components/toast.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script type="text/javascript">
document.addEventListener('livewire:init', () => {
Livewire.on('success', function(alert) {
Livewire.on('success', function({
alert
}) {
if (alert.modal !== null) {
modalHide(alert.modal)
}
Expand All @@ -12,7 +14,9 @@
},
alert.options));
});
Livewire.on('error', function(alert) {
Livewire.on('error', function({
alert
}) {
if (alert.modal !== null) {
modalHide(alert.modal)
}
Expand All @@ -24,7 +28,9 @@
},
alert.options));
});
Livewire.on('info', function(alert) {
Livewire.on('info', function({
alert
}) {
if (alert.modal !== null) {
modalHide(alert.modal)
}
Expand All @@ -36,7 +42,9 @@
},
alert.options));
});
Livewire.on('warning', function(alert) {
Livewire.on('warning', function({
alert
}) {
if (alert.modal !== null) {
modalHide(alert.modal)
}
Expand Down

0 comments on commit a9238e5

Please sign in to comment.