From 5d2c35397c23f3391cf99e499fe47d1d6e00e9ae Mon Sep 17 00:00:00 2001 From: Caleb Date: Thu, 5 Oct 2023 14:46:29 -0600 Subject: [PATCH] rename child care youth and education category --- src/Components/Results/Results.tsx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/Components/Results/Results.tsx b/src/Components/Results/Results.tsx index 0314abe67..7877355ce 100644 --- a/src/Components/Results/Results.tsx +++ b/src/Components/Results/Results.tsx @@ -157,7 +157,7 @@ const Results = () => { }); }; - const preschoolProgramCategory = 'Cuidado de Niños, Preescolar y Jóvenes'; + const preschoolProgramCategory = 'Child Care, Youth, and Education'; const categoryValues = (programs: Program[]) => { const preschoolPrograms = [0, 0]; const categoryValues: { [key: string]: number } = {}; @@ -608,6 +608,14 @@ const Results = () => { ); }; + const currentCategory = categories.find((cat) => { + if (filt.category === false) { + return false; + } + + return cat.defaultMessage === filt.category.value; + }); + return ( <>
@@ -622,17 +630,19 @@ const Results = () => { /> }
- {filt.category !== false && ( + {currentCategory && ( <> - {filt.category.value} + + + - ${totalDollarAmount(programs, filt.category.value).toLocaleString()}{' '} + ${totalDollarAmount(programs, currentCategory.defaultMessage).toLocaleString()}{' '} - {filt.category.value === - categories.find((cat) => cat.label === preschoolProgramCategory)?.defaultMessage && ( + {currentCategory.defaultMessage === + categories.find((cat) => cat.defaultMessage === preschoolProgramCategory)?.defaultMessage && (