Use stimulus for global reloading

This commit is contained in:
Jan Böhmer 2022-07-24 14:41:28 +02:00
parent 390deca544
commit ea6357c259
4 changed files with 22 additions and 14 deletions

View file

@ -0,0 +1,8 @@
import { Controller } from '@hotwired/stimulus';
export default class extends Controller {
connect() {
//If we encounter an element with global reload controller, then reload the whole page
window.location.href = window.location.href;
}
}