Skip to content
Snippets Groups Projects
Commit cac94455 authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

remove unncessary comments

parent 55527a9e
No related branches found
No related tags found
1 merge request!22Feature/nat 569 add opa to gui2
Pipeline #86935 passed
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);
};
......
// 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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment