@@ -19,38 +19,38 @@ import { useGetConfiguration } from 'state/configuration/configurationAtom';
1919import { useGetExtensions } from 'state/navigation/extensionsAtom' ;
2020import { useGetExtensibilitySchemas } from 'state/extensibilitySchemasAtom' ;
2121import { useGetValidationSchemas } from 'state/validationSchemasAtom' ;
22-
2322import { useLoginWithKubeconfigID } from 'components/App/useLoginWithKubeconfigID' ;
2423import { useMakeGardenerLoginRoute } from 'components/Gardener/useMakeGardenerLoginRoute' ;
2524import { useHandleResetEndpoint } from 'components/Clusters/shared' ;
26- import { Preferences } from 'components/Preferences/Preferences' ;
2725import { useResourceSchemas } from './resourceSchemas/useResourceSchemas' ;
26+ import { useAfterInitHook } from 'state/useAfterInitHook' ;
27+ import useSidebarCondensed from 'sidebar/useSidebarCondensed' ;
28+ import { useGetValidationEnabledSchemas } from 'state/validationEnabledSchemasAtom' ;
29+ import { useGetKymaResources } from 'state/kymaResourcesAtom' ;
30+
31+ import { Preferences } from 'components/Preferences/Preferences' ;
2832import { Header } from 'header/Header' ;
2933import { ContentWrapper } from './ContentWrapper/ContentWrapper' ;
3034import { Sidebar } from 'sidebar/Sidebar' ;
31- import { useInitTheme } from './useInitTheme' ;
3235import ClusterList from 'components/Clusters/views/ClusterList' ;
3336import ClusterRoutes from './ClusterRoutes' ;
34-
3537import { IncorrectPath } from './IncorrectPath' ;
38+ import { Spinner } from 'shared/components/Spinner/Spinner' ;
39+
40+ import { themeState } from 'state/preferences/themeAtom' ;
41+ import { initTheme } from './initTheme' ;
3642
3743import './App.scss' ;
38- import { useAfterInitHook } from 'state/useAfterInitHook' ;
39- import useSidebarCondensed from 'sidebar/useSidebarCondensed' ;
40- import { useGetValidationEnabledSchemas } from 'state/validationEnabledSchemasAtom' ;
41- import { useGetKymaResources } from 'state/kymaResourcesAtom' ;
42- import { Spinner } from 'shared/components/Spinner/Spinner' ;
4344
4445export default function App ( ) {
46+ const theme = useRecoilValue ( themeState ) ;
4547 const language = useRecoilValue ( languageAtom ) ;
4648 const cluster = useRecoilValue ( clusterState ) ;
4749 const setNamespace = useSetRecoilState ( activeNamespaceIdState ) ;
4850 const { namespace } = useUrl ( ) ;
4951 const makeGardenerLoginRoute = useMakeGardenerLoginRoute ( ) ;
5052 const { t, i18n } = useTranslation ( ) ;
5153
52- useInitTheme ( ) ;
53-
5454 useEffect ( ( ) => {
5555 setNamespace ( namespace ) ;
5656 } , [ setNamespace , namespace ] ) ;
@@ -80,6 +80,8 @@ export default function App() {
8080 return < Spinner /> ;
8181 }
8282
83+ initTheme ( theme ) ;
84+
8385 return (
8486 < div id = "html-wrap" >
8587 < Header />
0 commit comments