Skip to content

Commit

Permalink
Init i18n before usage
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed May 26, 2024
1 parent 589c153 commit bf8fdbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src_assets/common/assets/web/pin.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1 class="my-4 text-center">{{ $t('pin.pin_pairing') }}</h1>

<script type="module">
import { createApp } from 'vue'
import i18n from './locale.js'
import i18nLocale from './locale.js'
import Navbar from './Navbar.vue'
import {initApp} from "./init";

Expand All @@ -35,8 +35,9 @@ <h1 class="my-4 text-center">{{ $t('pin.pin_pairing') }}</h1>
}
});

initApp(app, (app => {
initApp(app, (async app => {
// this must be after mounting the app
const i18n = await i18nLocale()
document.querySelector("#form").addEventListener("submit", (e) => {
e.preventDefault();
let pin = document.querySelector("#pin-input").value;
Expand Down

0 comments on commit bf8fdbb

Please sign in to comment.