refactor: extract navigator into store instead

This commit is contained in:
Methapon Metanipat 2024-10-30 11:55:43 +07:00
parent caa3e59777
commit 6b29d3b017
10 changed files with 68 additions and 76 deletions

View file

@ -1,13 +1,13 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { getInstance } from 'src/services/keycloak';
import useUtilsStore from 'stores/utils';
import { useNavigator } from 'src/stores/navigator';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
const $q = useQuasar();
const { locale } = useI18n();
const utilsStore = useUtilsStore();
const navigatorStore = useNavigator();
const EDM_SERVICE = import.meta.env.VITE_EDM_MICRO_FRONTEND_URL;
const kc = getInstance();
const at = ref(kc.token);
@ -25,8 +25,8 @@ function sendMessage() {
}
onMounted(() => {
utilsStore.currentTitle.title = 'menu.dms';
utilsStore.currentTitle.path = [
navigatorStore.current.title = 'menu.dms';
navigatorStore.current.path = [
{
text: '',
i18n: true,