From 4b909a29169e7947be471470b0d44cefd7555c58 Mon Sep 17 00:00:00 2001 From: Ivonne Hernandez Date: Wed, 18 Dec 2024 10:25:50 -0700 Subject: [PATCH] Delete HealthInsuranceError component --- .../HealthInsuranceError.tsx | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/Components/HealthInsuranceError/HealthInsuranceError.tsx diff --git a/src/Components/HealthInsuranceError/HealthInsuranceError.tsx b/src/Components/HealthInsuranceError/HealthInsuranceError.tsx deleted file mode 100644 index f4eb2688b..000000000 --- a/src/Components/HealthInsuranceError/HealthInsuranceError.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { useEffect } from 'react'; -import { - useErrorController, - healthInsuranceDataHasError, - getHealthInsuranceError, -} from '../../Assets/validationFunctions'; -import { HealthInsurance } from '../../Types/FormData'; -import { FormHelperText } from '@mui/material'; - -interface HealthInsuranceErrorProps { - hhMemberIndex: number; - hhMemberInsurance: HealthInsurance; - submitted: number; -} - -const HealthInsuranceError = ({ hhMemberIndex, hhMemberInsurance, submitted }: HealthInsuranceErrorProps) => { - const healthInsuranceErrorController = useErrorController(healthInsuranceDataHasError, getHealthInsuranceError); - - useEffect(() => { - healthInsuranceErrorController.setSubmittedCount(submitted); - }, [submitted]); - - useEffect(() => { - healthInsuranceErrorController.updateError(hhMemberInsurance); - }); - - return ( - healthInsuranceErrorController.showError && ( - - {healthInsuranceErrorController.message({ index: hhMemberIndex, healthInsurance: hhMemberInsurance })} - - ) - ); -}; - -export default HealthInsuranceError;