F
Filament15mo ago
Vp

How can I remove console warning

I use render-hook panels::global-search.after to show theme switcher. Everything is working fine, but every time I change I got console warning. It is not really important but if someone knows then it would be very helpful. My custom blade
<div
x-data="{
theme: null,

init: function () {
this.theme = localStorage.getItem('theme') || 'system'

$dispatch('theme-changed', theme)

$watch('theme', (theme) => {
$dispatch('theme-changed', theme)
})
},
}"
class="hidden md:flex gap-x-1"
>
<x-filament-panels::theme-switcher.button
icon="heroicon-o-sun"
theme="light"
/>

<x-filament-panels::theme-switcher.button
icon="heroicon-o-moon"
theme="dark"
/>

<x-filament-panels::theme-switcher.button
icon="heroicon-o-computer-desktop"
theme="system"
/>
</div>
<div
x-data="{
theme: null,

init: function () {
this.theme = localStorage.getItem('theme') || 'system'

$dispatch('theme-changed', theme)

$watch('theme', (theme) => {
$dispatch('theme-changed', theme)
})
},
}"
class="hidden md:flex gap-x-1"
>
<x-filament-panels::theme-switcher.button
icon="heroicon-o-sun"
theme="light"
/>

<x-filament-panels::theme-switcher.button
icon="heroicon-o-moon"
theme="dark"
/>

<x-filament-panels::theme-switcher.button
icon="heroicon-o-computer-desktop"
theme="system"
/>
</div>
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server