Initializes theme on app load
Ensures the selected theme (dark/light mode) is applied immediately when the application loads, preventing a flash of incorrect theme on startup.
This commit is contained in:
parent
9c663973b0
commit
8c33dc6e11
1 changed files with 4 additions and 0 deletions
|
|
@ -9,10 +9,14 @@ import 'vue-sonner/style.css'
|
|||
import { useMarketPreloader } from '@/modules/market/composables/useMarketPreloader'
|
||||
import { auth } from '@/composables/useAuthService'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useTheme } from '@/components/theme-provider'
|
||||
|
||||
const route = useRoute()
|
||||
const showLoginDialog = ref(false)
|
||||
|
||||
// Initialize theme (applies dark mode immediately)
|
||||
useTheme()
|
||||
|
||||
// Initialize preloader
|
||||
const marketPreloader = useMarketPreloader()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue