Skip to content

Commit

Permalink
format compat with Livewire
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Nov 25, 2024
1 parent e24c2d0 commit b317fde
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions resources/views/components/banner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,10 @@
this.runCallbacks();
this.show = false;
},
<!-- prettier-ignore-start -->
callbacks: {
@foreach($cookies as $group)
'{{ $group->key }}': function() {
{!! value($group->onAccepted) !!}
},
@endforeach
{{-- Do not use @foreach of @if or it will break when used with Livewire --}}
{!! $cookies->map(fn($group) => "'{$group->key}': function(){\n" . value($group->onAccepted) . "\n}")->join(",\n") !!}
},
<!-- prettier-ignore-end -->
}" x-show="show" x-cloak x-on:cookies-consent.window="show = true">
<div class="min-h-0 overflow-auto rounded-md bg-white shadow-md dark:bg-zinc-900 dark:text-white">
<div class="p-4">
Expand Down

0 comments on commit b317fde

Please sign in to comment.