diff --git a/pages/_app.tsx b/pages/_app.tsx index 4213815..3b6d561 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,20 +1,19 @@ -import React, { useEffect, useState } from "react"; -import NoSSR from "react-no-ssr"; -import { QueryClient, QueryClientProvider } from "react-query"; -import { ReactQueryDevtools } from "react-query/devtools"; -import { QueryClientConfig } from "react-query/types/core/types"; - -import { SessionProvider } from "next-auth/react"; -import { NextAdapter } from "next-query-params"; -import App, { AppContext, AppInitialProps, AppProps } from "next/app"; -import Head from "next/head"; -import { useRouter } from "next/router"; -import { QueryParamProvider } from "use-query-params"; - -import type { EuiSideNavItemType } from "@elastic/eui"; -import { EuiProvider, EuiThemeColorMode } from "@elastic/eui"; -import "@elastic/eui/dist/eui_theme_light.min.css"; - +import React, { useEffect, useState } from 'react'; +import NoSSR from 'react-no-ssr'; +import { QueryClient, QueryClientProvider } from 'react-query'; +import { ReactQueryDevtools } from 'react-query/devtools'; +import { QueryClientConfig } from 'react-query/types/core/types'; + +import { SessionProvider } from 'next-auth/react'; +import { NextAdapter } from 'next-query-params'; +import App, { AppContext, AppInitialProps, AppProps } from 'next/app'; +import Head from 'next/head'; +import { useRouter } from 'next/router'; +import { QueryParamProvider } from 'use-query-params'; + +import type { EuiSideNavItemType } from '@elastic/eui'; +import { EuiProvider, EuiThemeColorMode } from '@elastic/eui'; +import '@elastic/eui/dist/eui_theme_light.min.css'; import { ColorModes, ConfirmationDialogContextWrapper, @@ -27,13 +26,13 @@ import { WfoPageTemplate, WfoToastsList, defaultOrchestratorTheme, -} from "@orchestrator-ui/orchestrator-ui-components"; +} from '@orchestrator-ui/orchestrator-ui-components'; -import { getAppLogo } from "@/components/AppLogo/AppLogo"; -import { getInitialOrchestratorConfig } from "@/configuration"; -import { TranslationsProvider } from "@/translations/translationsProvider"; +import { getAppLogo } from '@/components/AppLogo/AppLogo'; +import { getInitialOrchestratorConfig } from '@/configuration'; +import { TranslationsProvider } from '@/translations/translationsProvider'; -import "../font/inter.css"; +import '../font/inter.css'; type AppOwnProps = { orchestratorConfig: OrchestratorConfig }; @@ -55,17 +54,17 @@ function CustomApp({ const [queryClient] = useState(() => new QueryClient(queryClientConfig)); const [themeMode, setThemeMode] = useState( - ColorModes.LIGHT + ColorModes.LIGHT, ); const handleThemeSwitch = (newThemeMode: EuiThemeColorMode) => { setThemeMode(newThemeMode); - localStorage.setItem("themeMode", newThemeMode); + localStorage.setItem('themeMode', newThemeMode); }; useEffect(() => { // Initialize theme mode from localStorage or set it to 'light' if not present - const storedTheme = localStorage.getItem("themeMode"); + const storedTheme = localStorage.getItem('themeMode'); if ( !storedTheme || (storedTheme !== ColorModes.LIGHT && @@ -76,19 +75,19 @@ function CustomApp({ }, []); const addMenuItems = ( - defaultMenuItems: EuiSideNavItemType[] + defaultMenuItems: EuiSideNavItemType[], ): EuiSideNavItemType[] => [ ...defaultMenuItems, { - name: "Example form", - id: "10", - isSelected: router.pathname === "/example-form", - href: "/example-form", + name: 'Example form', + id: '10', + isSelected: router.pathname === '/example-form', + href: '/example-form', renderItem: () => ( ), }, @@ -168,7 +167,7 @@ function CustomApp({ } CustomApp.getInitialProps = async ( - context: AppContext + context: AppContext, ): Promise => { const ctx = await App.getInitialProps(context);