Update the locale changer links every time turbo loads a new frame.

This commit is contained in:
Jan Böhmer 2022-07-24 17:03:57 +02:00
parent 1a9dfee0ed
commit 7990cf56d1
3 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,8 @@
import { Controller } from '@hotwired/stimulus';
export default class extends Controller {
connect() {
const menu = document.getElementById('locale-select-menu');
menu.innerHTML = this.element.innerHTML;
}
}