diff --git a/contexts/GsoConfigContext.tsx b/contexts/GsoConfigContext.tsx index 5043bd0a1032ad4b3713e45e39c8be5aedbebd52..3758ae9dc6432e7080fffc0292be1269f75f5391 100644 --- a/contexts/GsoConfigContext.tsx +++ b/contexts/GsoConfigContext.tsx @@ -1,27 +1,22 @@ import React, { createContext, useContext, ReactNode } from 'react'; -// Define the shape of the GsoConfig interface GsoConfig { opaPublicBundleUrl: string; oidcClientId: string; } -// Create the default values for the context const defaultGsoConfig: GsoConfig = { opaPublicBundleUrl: '', oidcClientId: '', }; -// Create the context const GsoConfigContext = createContext<GsoConfig>(defaultGsoConfig); -// Define the provider's props, including children interface GsoConfigProviderProps { initialOrchestratorConfig: GsoConfig; children: ReactNode; } -// Create a provider component export const GsoConfigProvider: React.FC<GsoConfigProviderProps> = ({ initialOrchestratorConfig, children, @@ -33,7 +28,6 @@ export const GsoConfigProvider: React.FC<GsoConfigProviderProps> = ({ ); }; -// Create a custom hook for using the context export const useGsoConfig = () => { return useContext(GsoConfigContext); }; diff --git a/pages/_app.tsx b/pages/_app.tsx index a25e6f95a8d5d33f595e0c2e4887dfb6039eecf3..3de870b9ae0f274664acf5a009f70bc0e04f0535 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,4 +1,3 @@ -// Adjust the import path as necessary import '../font/inter.css'; import { getAppLogo } from '@/components/AppLogo/AppLogo'; import { WfoAuthWithPolicy } from '@/components/WfoAuthWithPolicy'; @@ -7,7 +6,6 @@ import { getInitialOrchestratorConfig, } from '@/configuration'; import { gsoConfig } from '@/configuration/configuration'; -// Adjust the import path as necessary import { GsoConfigProvider } from '@/contexts/GsoConfigContext'; import { TranslationsProvider } from '@/translations/translationsProvider'; import { EuiProvider, EuiThemeColorMode } from '@elastic/eui';