Fix: Livewire 503 löst echten Page-Reload aus statt Modal-Rendering
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main v1.1.281
parent
227c623578
commit
8fd9fccc70
|
|
@ -214,5 +214,17 @@
|
|||
@vite(['resources/js/app.js'])
|
||||
@livewireScripts
|
||||
@livewire('wire-elements-modal')
|
||||
<script>
|
||||
document.addEventListener('livewire:init', () => {
|
||||
Livewire.hook('request', ({ fail }) => {
|
||||
fail(({ status, preventDefault }) => {
|
||||
if (status === 503) {
|
||||
preventDefault()
|
||||
setTimeout(() => window.location.reload(), 500)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue