2023-10-12 23:34:46 +00:00
|
|
|
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
|
|
|
import "@hotwired/turbo-rails"
|
|
|
|
import "controllers"
|
2023-10-27 21:27:21 +00:00
|
|
|
|
|
|
|
let switchLanguageForm = document.querySelector("#active_language_form");
|
|
|
|
let switchLanguageSelectTag = document.querySelector("#active_language_select_tag");
|
|
|
|
|
|
|
|
switchLanguageSelectTag.addEventListener("change", (event) => {
|
|
|
|
switchLanguageForm.submit();
|
|
|
|
});
|