Files
myprojplanet_vite/src/store/testStore.ts
Surya Paolo bc960d38a1 PASSAGGIO A VITE !
AGG. 1.1.23
2025-03-01 14:14:43 +01:00

35 lines
672 B
TypeScript

import { defineStore } from 'pinia'
import { tools } from '@tools'
import { toolsext } from '@store/Modules/toolsext'
export interface ITest {
finishLoading: boolean
}
export const useTestStore = defineStore(
'TestStore',
{
state: (): ITest => ({
finishLoading: false,
}),
getters: {
isMyLang: (state: ITest) => (rec: { lang: string }): boolean => {
if (!rec.lang) return true
return (rec.lang === toolsext.getLocale(false) || toolsext.getLocale() === '')
},
},
actions: {
testProva() {
let arrpagesroute = null
arrpagesroute = this.isMyLang({ lang: 'test' })
},
},
})