From 835958b0c92a56029c97281c40c47755e3dc5913 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Mon, 29 Dec 2025 19:41:55 -0600 Subject: [PATCH] adding daisy ui --- .../logForm/LogFormState.interface.ts | 3 --- client/src/components/logForm/reducer.tsx | 24 ------------------- client/src/components/pilots/Pilots.tsx | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/client/src/components/logForm/LogFormState.interface.ts b/client/src/components/logForm/LogFormState.interface.ts index 8a9f95f..449ccdc 100644 --- a/client/src/components/logForm/LogFormState.interface.ts +++ b/client/src/components/logForm/LogFormState.interface.ts @@ -2,11 +2,8 @@ import { Alert } from "../../interfaces/Alert.interface"; export interface LogFormState { alert: Alert | undefined; - experienceSelectedKeys: Selection; - instrumentSelectedKeys: Selection; isDisabled: boolean; isLoading: boolean; - landingsSelectedKeys: Selection; pilotOptions: { key: string; label: string; }[]; selectedPilotName: string; } diff --git a/client/src/components/logForm/reducer.tsx b/client/src/components/logForm/reducer.tsx index 84f6714..277d03f 100644 --- a/client/src/components/logForm/reducer.tsx +++ b/client/src/components/logForm/reducer.tsx @@ -3,21 +3,15 @@ import { LogFormState } from './LogFormState.interface'; type Action = | { type: 'SET_ALERT'; payload: Alert | undefined } - | { type: 'SET_EXPERIENCE_SELECTED_KEYS'; payload: Selection } - | { type: 'SET_INSTRUMENT_SELECTED_KEYS'; payload: Selection } | { type: 'SET_IS_DISABLED'; payload: boolean } | { type: 'SET_IS_LOADING'; payload: boolean } - | { type: 'SET_LANDINGS_SELECTED_KEYS'; payload: Selection } | { type: 'SET_PILOT_OPTIONS'; payload: { key: string, label: string; }[] } | { type: 'SET_SELECTED_PILOT_NAME'; payload: string }; export const initialState: LogFormState = { alert: undefined, - experienceSelectedKeys: new Set([]), - instrumentSelectedKeys: new Set([]), isDisabled: false, isLoading: true, - landingsSelectedKeys: new Set(['1']), pilotOptions: [], selectedPilotName: '' }; @@ -33,36 +27,18 @@ export const reducer = ( alert: action.payload }; } - case 'SET_EXPERIENCE_SELECTED_KEYS': { - return { - ...state, - experienceSelectedKeys: action.payload - } - } case 'SET_IS_DISABLED': { return { ...state, isDisabled: action.payload }; } - case 'SET_INSTRUMENT_SELECTED_KEYS': { - return { - ...state, - instrumentSelectedKeys: action.payload - } - } case 'SET_IS_LOADING': { return { ...state, isLoading: action.payload }; } - case 'SET_LANDINGS_SELECTED_KEYS': { - return { - ...state, - landingsSelectedKeys: action.payload - } - } case 'SET_PILOT_OPTIONS': { return { ...state, diff --git a/client/src/components/pilots/Pilots.tsx b/client/src/components/pilots/Pilots.tsx index 2d51465..9326dbb 100644 --- a/client/src/components/pilots/Pilots.tsx +++ b/client/src/components/pilots/Pilots.tsx @@ -195,7 +195,7 @@ const Pilots: React.FC = () => { - dispatch({ type: 'SET_FORM_ALERT', payload: undefined }) + dispatch({ type: 'SET_ALERT', payload: undefined }) } severity={state.alert.severity} >