Refactor i18n integration in superuser navigation menu items
- Replaced `useI18n` with global `i18n` instance for consistency. - Adjusted translation function to `i18n.global.t` for improved maintainability.
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
import { NavigationItemProps } from "@/components/models/navigation/NavigationItem.vue";
|
||||
import {computed, defineComponent} from 'vue';
|
||||
import SessionUser from "@/components/session/token/SessionUser.vue";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import i18n from '@/i18n';
|
||||
|
||||
const firstToUpperCase = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);
|
||||
|
||||
const { t } = useI18n();
|
||||
const t = (key: string) => i18n.global.t(key);
|
||||
|
||||
const items = computed<NavigationItemProps[]>(() => [
|
||||
// Invoicing
|
||||
|
||||
Reference in New Issue
Block a user