fix: critical bug fixes - routes UUID, image paths, favorites loading, bottom nav debounce
This commit is contained in:
@ -4,12 +4,16 @@ import { RouterView, useRoute } from "vue-router";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import MainLayout from "./components/layouts/MainLayout.vue";
|
||||
import { useThemeStore } from './stores/theme'
|
||||
import { useAuthStore } from './stores/auth'
|
||||
import { useFavoritesStore } from './stores/favorites'
|
||||
import { analyticsService } from '@/services/analyticsService'
|
||||
|
||||
// Initialize theme store
|
||||
const route = useRoute()
|
||||
const { locale } = useI18n()
|
||||
const themeStore = useThemeStore()
|
||||
const authStore = useAuthStore()
|
||||
const favoritesStore = useFavoritesStore()
|
||||
|
||||
const isSplashScreen = computed(() => route.name === 'splash')
|
||||
const isAuthScreen = computed(() => route.name === 'auth' || route.path === '/login')
|
||||
@ -20,6 +24,10 @@ onMounted(() => {
|
||||
event_name: 'app_open',
|
||||
properties: { language: locale.value }
|
||||
})
|
||||
// Load favorites if the user is already logged in
|
||||
if (authStore.isAuthenticated) {
|
||||
favoritesStore.loadFavorites()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user