1- import React , { useEffect , useState } from "react" ;
2- import NoSSR from "react-no-ssr" ;
3- import { QueryClient , QueryClientProvider } from "react-query" ;
4- import { ReactQueryDevtools } from "react-query/devtools" ;
5- import { QueryClientConfig } from "react-query/types/core/types" ;
6-
7- import { SessionProvider } from "next-auth/react" ;
8- import { NextAdapter } from "next-query-params" ;
9- import App , { AppContext , AppInitialProps , AppProps } from "next/app" ;
10- import Head from "next/head" ;
11- import { useRouter } from "next/router" ;
12- import { QueryParamProvider } from "use-query-params" ;
13-
14- import type { EuiSideNavItemType } from "@elastic/eui" ;
15- import { EuiProvider , EuiThemeColorMode } from "@elastic/eui" ;
16- import "@elastic/eui/dist/eui_theme_light.min.css" ;
17-
1+ import React , { useEffect , useState } from 'react' ;
2+ import NoSSR from 'react-no-ssr' ;
3+ import { QueryClient , QueryClientProvider } from 'react-query' ;
4+ import { ReactQueryDevtools } from 'react-query/devtools' ;
5+ import { QueryClientConfig } from 'react-query/types/core/types' ;
6+
7+ import { SessionProvider } from 'next-auth/react' ;
8+ import { NextAdapter } from 'next-query-params' ;
9+ import App , { AppContext , AppInitialProps , AppProps } from 'next/app' ;
10+ import Head from 'next/head' ;
11+ import { useRouter } from 'next/router' ;
12+ import { QueryParamProvider } from 'use-query-params' ;
13+
14+ import type { EuiSideNavItemType } from '@elastic/eui' ;
15+ import { EuiProvider , EuiThemeColorMode } from '@elastic/eui' ;
16+ import '@elastic/eui/dist/eui_theme_light.min.css' ;
1817import {
1918 ColorModes ,
2019 ConfirmationDialogContextWrapper ,
@@ -27,13 +26,13 @@ import {
2726 WfoPageTemplate ,
2827 WfoToastsList ,
2928 defaultOrchestratorTheme ,
30- } from " @orchestrator-ui/orchestrator-ui-components" ;
29+ } from ' @orchestrator-ui/orchestrator-ui-components' ;
3130
32- import { getAppLogo } from " @/components/AppLogo/AppLogo" ;
33- import { getInitialOrchestratorConfig } from " @/configuration" ;
34- import { TranslationsProvider } from " @/translations/translationsProvider" ;
31+ import { getAppLogo } from ' @/components/AppLogo/AppLogo' ;
32+ import { getInitialOrchestratorConfig } from ' @/configuration' ;
33+ import { TranslationsProvider } from ' @/translations/translationsProvider' ;
3534
36- import " ../font/inter.css" ;
35+ import ' ../font/inter.css' ;
3736
3837type AppOwnProps = { orchestratorConfig : OrchestratorConfig } ;
3938
@@ -55,17 +54,17 @@ function CustomApp({
5554 const [ queryClient ] = useState ( ( ) => new QueryClient ( queryClientConfig ) ) ;
5655
5756 const [ themeMode , setThemeMode ] = useState < EuiThemeColorMode > (
58- ColorModes . LIGHT
57+ ColorModes . LIGHT ,
5958 ) ;
6059
6160 const handleThemeSwitch = ( newThemeMode : EuiThemeColorMode ) => {
6261 setThemeMode ( newThemeMode ) ;
63- localStorage . setItem ( " themeMode" , newThemeMode ) ;
62+ localStorage . setItem ( ' themeMode' , newThemeMode ) ;
6463 } ;
6564
6665 useEffect ( ( ) => {
6766 // Initialize theme mode from localStorage or set it to 'light' if not present
68- const storedTheme = localStorage . getItem ( " themeMode" ) ;
67+ const storedTheme = localStorage . getItem ( ' themeMode' ) ;
6968 if (
7069 ! storedTheme ||
7170 ( storedTheme !== ColorModes . LIGHT &&
@@ -76,19 +75,19 @@ function CustomApp({
7675 } , [ ] ) ;
7776
7877 const addMenuItems = (
79- defaultMenuItems : EuiSideNavItemType < object > [ ]
78+ defaultMenuItems : EuiSideNavItemType < object > [ ] ,
8079 ) : EuiSideNavItemType < object > [ ] => [
8180 ...defaultMenuItems ,
8281 {
83- name : " Example form" ,
84- id : "10" ,
85- isSelected : router . pathname === " /example-form" ,
86- href : " /example-form" ,
82+ name : ' Example form' ,
83+ id : '10' ,
84+ isSelected : router . pathname === ' /example-form' ,
85+ href : ' /example-form' ,
8786 renderItem : ( ) => (
8887 < WfoMenuItemLink
89- path = { " /example-form" }
88+ path = { ' /example-form' }
9089 translationString = "Example form"
91- isSelected = { router . pathname === " /example-form" }
90+ isSelected = { router . pathname === ' /example-form' }
9291 />
9392 ) ,
9493 } ,
@@ -168,7 +167,7 @@ function CustomApp({
168167}
169168
170169CustomApp . getInitialProps = async (
171- context : AppContext
170+ context : AppContext ,
172171) : Promise < AppOwnProps & AppInitialProps > => {
173172 const ctx = await App . getInitialProps ( context ) ;
174173
0 commit comments