Skip to content

Commit

Permalink
complete update eligibility overview
Browse files Browse the repository at this point in the history
  • Loading branch information
wbglaeser committed Dec 31, 2024
1 parent a7c93d8 commit b0e6722
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/ui/screens/eligibilty-overview/hooks/useEligibilityData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { useEffect, useState } from "react";
import { buildEligibilityReports } from "../../../../core/utilities/buildEligibilityReports";

const useEligibilityData = (validationReport, hydrationData, language) => {
const [eligibilityData, setEligibilityData] = useState(null);

useEffect(() => {
if (validationReport && hydrationData) {
const data = buildEligibilityReports(validationReport, hydrationData, language);
setEligibilityData(data);
}
}, [validationReport, hydrationData, language]);

return eligibilityData;
};

export default useEligibilityData;

0 comments on commit b0e6722

Please sign in to comment.