Files
myprojplanet_vite/src/components/CCheckIfIsLogged/CCheckIfIsLogged.ts

43 lines
1.0 KiB
TypeScript
Raw Normal View History

import { defineComponent, ref, computed, PropType, toRef } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
2025-03-01 14:14:43 +01:00
import { useI18n } from 'vue-i18n'
import { tools } from '@tools'
import { costanti } from '@store/Modules/costanti'
import { static_data } from '@src/db/static_data'
2025-03-01 14:14:43 +01:00
import { CRegistration } from '@src/components/CRegistration'
export default defineComponent({
name: 'CCheckIfIsLogged',
components: { CRegistration },
2023-01-12 01:03:19 +01:00
props: {
showalways: {
type: Boolean,
required: false,
2023-01-12 01:03:19 +01:00
default: false,
},
},
setup(props, { emit }) {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const { t } = useI18n()
const isLogged = computed(() => userStore.isLogged)
const site = ref(globalStore.site)
return {
userStore,
tools,
costanti,
static_data,
site,
isLogged,
t,
}
}
})