diff --git a/app/src/App.tsx b/app/src/App.tsx index c1d86f2..cf7bead 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -4,6 +4,7 @@ import Pilots from './components/pilots/Pilots'; import { useAppContext } from './hooks/appContext/UseAppContext'; import axios, { AxiosResponse } from 'axios'; import { useFeatureFlag } from './hooks/featureFlag/UseFeatureFlag'; +import { IFeatureFlagValue } from './hooks/featureFlag/IFeatureFlagValue'; const App: React.FC = () => { const appContext = useAppContext(); @@ -14,7 +15,7 @@ const App: React.FC = () => { const response: AxiosResponse = await axios.get( `http://localhost:7071/api/featureFlags?key=flying*&label=${process.env.NODE_ENV}` ); - const featureFlags: unknown[] = response.data; + const featureFlags: IFeatureFlagValue[] = response.data; if (featureFlags.length > 0) { appContext.dispatch({ diff --git a/app/src/components/logbookEntryForm/LogbookEntryForm.tsx b/app/src/components/logbookEntryForm/LogbookEntryForm.tsx index 18d53db..2c9e6c7 100644 --- a/app/src/components/logbookEntryForm/LogbookEntryForm.tsx +++ b/app/src/components/logbookEntryForm/LogbookEntryForm.tsx @@ -1,122 +1,122 @@ -import React from 'react'; -import { - Accordion, - AccordionItem, - Button, - DatePicker, - Input -} from '@nextui-org/react'; -import { useForm, Controller, SubmitHandler } from 'react-hook-form'; +// import React from 'react'; +// import { +// Accordion, +// AccordionItem, +// Button, +// DatePicker, +// Input +// } from '@nextui-org/react'; +// import { useForm, Controller, SubmitHandler } from 'react-hook-form'; -const LogbookEntryForm: React.FC = () => { - const { control, handleSubmit } = useForm(); +// const LogbookEntryForm: React.FC = () => { +// const { control, handleSubmit } = useForm(); - const onSubmit = (data: unknown) => { - console.log(data); - }; +// const onSubmit = (data: unknown) => { +// console.log(data); +// }; - return ( -
-
-
- -
-
- } - /> -
-
- -
-
- ( - - )} - /> -
-
- -
-
- ( - - )} - /> -
-
- -
-
- } - /> -
-
- -
-
- } - /> -
-
- -
-
- } - /> -
-
- -
-
- } - /> -
-
- - -
- -
-
- } - /> -
-
-
-
-
- - -
-
-
- ); -}; +// return ( +//
+//
+//
+// +//
+//
+// } +// /> +//
+//
+// +//
+//
+// ( +// +// )} +// /> +//
+//
+// +//
+//
+// ( +// +// )} +// /> +//
+//
+// +//
+//
+// } +// /> +//
+//
+// +//
+//
+// } +// /> +//
+//
+// +//
+//
+// } +// /> +//
+//
+// +//
+//
+// } +// /> +//
+//
+// +// +//
+// +//
+//
+// } +// /> +//
+//
+//
+//
+//
+// +// +//
+//
+//
+// ); +// }; -export default LogbookEntryForm; +// export default LogbookEntryForm; diff --git a/app/src/components/pilotForm/PilotForm.tsx b/app/src/components/pilotForm/PilotForm.tsx index 9bb6e3f..77b07ae 100644 --- a/app/src/components/pilotForm/PilotForm.tsx +++ b/app/src/components/pilotForm/PilotForm.tsx @@ -1,85 +1,85 @@ -import { - Accordion, - AccordionItem, - Button, - DatePicker, - Input, - Select, - SelectItem -} from '@nextui-org/react'; -import { useForm, Controller, SubmitHandler } from 'react-hook-form'; +// import { +// Accordion, +// AccordionItem, +// Button, +// DatePicker, +// Input, +// Select, +// SelectItem +// } from '@nextui-org/react'; +// import { useForm, Controller, SubmitHandler } from 'react-hook-form'; -const PilotForm: React.FC = () => { - const { control, handleSubmit } = useForm(); +// const PilotForm: React.FC = () => { +// const { control, handleSubmit } = useForm(); - const onSubmit = (data: unknown) => { - console.log(data); - }; +// const onSubmit = (data: unknown) => { +// console.log(data); +// }; - return ( -
-
-
- -
-
- } - /> -
-
- -
-
- } - /> -
-
- - -
-
- -
-
- ( - - )} - /> -
-
- -
-
- } - /> -
-
-
-
-
- ); -}; +// return ( +//
+//
+//
+// +//
+//
+// } +// /> +//
+//
+// +//
+//
+// } +// /> +//
+//
+// +// +//
+//
+// +//
+//
+// ( +// +// )} +// /> +//
+//
+// +//
+//
+// } +// /> +//
+//
+//
+//
+//
+// ); +// }; -export default PilotForm; +// export default PilotForm; diff --git a/app/src/components/pilots/Pilots.tsx b/app/src/components/pilots/Pilots.tsx index 2344bfa..7be90c5 100644 --- a/app/src/components/pilots/Pilots.tsx +++ b/app/src/components/pilots/Pilots.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import SiteNav from '../siteNav/SiteNav'; -import PilotForm from '../pilotForm/PilotForm'; +// import PilotForm from '../pilotForm/PilotForm'; import { Button } from '@nextui-org/react'; import { Drawer, @@ -37,9 +37,7 @@ const Pilots: React.FC = () => {

Add Pilot

- - - + {/* */}
diff --git a/app/src/context/appContext/IAppContextState.ts b/app/src/context/appContext/IAppContextState.ts index 1803154..094551b 100644 --- a/app/src/context/appContext/IAppContextState.ts +++ b/app/src/context/appContext/IAppContextState.ts @@ -1,3 +1,5 @@ +import { IFeatureFlagValue } from '../../hooks/featureFlag/IFeatureFlagValue'; + export interface IAppContextState { - featureFlags: unknown[]; + featureFlags: IFeatureFlagValue[]; } diff --git a/app/src/context/appContext/reducer.ts b/app/src/context/appContext/reducer.ts index 775d371..cab967c 100644 --- a/app/src/context/appContext/reducer.ts +++ b/app/src/context/appContext/reducer.ts @@ -1,6 +1,10 @@ +import { IFeatureFlagValue } from '../../hooks/featureFlag/IFeatureFlagValue'; import { IAppContextState } from './IAppContextState'; -export type Action = { type: 'SET_FEATURE_FLAGS'; payload: unknown[] }; +export type Action = { + type: 'SET_FEATURE_FLAGS'; + payload: IFeatureFlagValue[]; +}; export const reducer = ( state: IAppContextState,