1
0

fix: use onActivated

This commit is contained in:
kolaente
2023-03-24 20:06:08 +01:00
committed by Dominik Pschenitschni
parent c5776264c0
commit a33fb72ef8
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import {computed, onMounted, ref} from 'vue'
import {computed, onActivated, ref} from 'vue'
import {useI18n} from 'vue-i18n'
import {useAuthStore} from '@/stores/auth'
@ -9,7 +9,7 @@ export type Daytime = 'night' | 'morning' | 'day' | 'evening'
export function useDaytimeSalutation() {
const {t} = useI18n({useScope: 'global'})
const now = ref(new Date())
onMounted(() => now.value = new Date())
onActivated(() => now.value = new Date())
const authStore = useAuthStore()
const name = computed(() => authStore.userDisplayName)