@@ -20,7 +20,7 @@ import {
2020import NavigationSidebarItem from ' @/Components/NavigationSidebarItem.vue' ;
2121import UserSettingsIcon from ' @/Components/UserSettingsIcon.vue' ;
2222import MainContainer from ' @/packages/ui/src/MainContainer.vue' ;
23- import { onMounted , ref , watch } from " vue" ;
23+ import { onMounted , ref } from " vue" ;
2424import NotificationContainer from ' @/Components/NotificationContainer.vue' ;
2525import { initializeStores , refreshStores } from ' @/utils/init' ;
2626import {
@@ -31,13 +31,13 @@ import {
3131 canViewProjects , canViewReport ,
3232 canViewTags ,
3333} from ' @/utils/permissions' ;
34- import {isBillingActivated , isInvoicingActivated } from ' @/utils/billing' ;
34+ import { isBillingActivated , isInvoicingActivated } from ' @/utils/billing' ;
3535import type { User } from ' @/types/models' ;
3636import { ArrowsRightLeftIcon } from ' @heroicons/vue/16/solid' ;
3737import { fetchToken , isTokenValid } from ' @/utils/session' ;
3838import UpdateSidebarNotification from ' @/Components/UpdateSidebarNotification.vue' ;
3939import BillingBanner from ' @/Components/Billing/BillingBanner.vue' ;
40- import { theme } from " @/utils/theme" ;
40+ import { useTheme } from " @/utils/theme" ;
4141
4242defineProps ({
4343 title: String ,
@@ -47,12 +47,7 @@ const showSidebarMenu = ref(false);
4747const isUnloading = ref (false );
4848onMounted (async () => {
4949
50- document .documentElement .classList .add (theme .value );
51- watch (theme , (newTheme , oldTheme ) => {
52- document .documentElement .classList .remove (oldTheme );
53- document .documentElement .classList .add (newTheme );
54- });
55-
50+ useTheme ()
5651 // make sure that the initial requests are only loaded once, this can be removed once we move away from inertia
5752 if (window .initialDataLoaded !== true ) {
5853 window .initialDataLoaded = true ;
0 commit comments