Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Add comma to separate integer columns in Title I [#418](https://github.com/policy-design-lab/pdl-frontend/issues/418)
- Reduced bottom marge for issue briefs on the Issue/White Paper page [#425](https://github.com/policy-design-lab/pdl-frontend/issues/425)
- Change All Programs Total key format [#421](https://github.com/policy-design-lab/pdl-frontend/issues/421)

## [1.11.0] - 2025-07-31

Expand Down
2 changes: 1 addition & 1 deletion src/components/LandingPageMapTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function LandingPageMapTab({
let cropTotal = "";
let snapTotal = "";
if (cur !== undefined) {
allProgramTotal = cur["18-22 All Programs Total"];
allProgramTotal = cur["2018-2022 All Programs Total"];
titleITotal = cur["Title I Total"];
titleIITotal = cur["Title II Total"];
cropTotal = cur["Crop Insurance Total"];
Expand Down
4 changes: 2 additions & 2 deletions src/components/LandingPageProgramMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MapChart = (props) => {
});
switch (title) {
case "All Programs":
searchKey = "18-22 All Programs Total";
searchKey = "2018-2022 All Programs Total";
color1 = "#FFF9D8";
color2 = "#E1F2C4";
color3 = "#9FD9BA";
Expand Down Expand Up @@ -161,7 +161,7 @@ const MapChart = (props) => {
if (title === "All Programs") {
records = allPrograms.filter((s) => s.State === cur.id);
records.forEach((record) => {
total += record["18-22 All Programs Total"];
total += record["2018-2022 All Programs Total"];
});
} else {
records = summary.filter((s) => s.State === cur.id && s.Title === title);
Expand Down
6 changes: 3 additions & 3 deletions src/components/LandingPageTotalMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const LandingPageTotalMap = ({
if (!allPrograms || !summary) return 0;
if (selectedPrograms.includes("All Programs")) {
const stateProgram = allPrograms.find((s) => s.State === state);
return stateProgram ? stateProgram["18-22 All Programs Total"] : 0;
return stateProgram ? stateProgram["2018-2022 All Programs Total"] : 0;
}
return selectedPrograms.reduce((total, program) => {
const programTotal = summary
Expand All @@ -273,7 +273,7 @@ const LandingPageTotalMap = ({
if (selectedPrograms.includes("All Programs")) {
return allStates.reduce((total, state) => {
const stateProgram = allPrograms.find((s) => s.State === state.id);
return total + (stateProgram?.["18-22 All Programs Total"] || 0);
return total + (stateProgram?.["2018-2022 All Programs Total"] || 0);
}, 0);
}
return allStates.reduce((total, state) => {
Expand Down Expand Up @@ -337,7 +337,7 @@ const LandingPageTotalMap = ({
const hasData = allStates.some((state) => {
setSelectedPrograms((prev) => [...prev]);
const stateProgram = allPrograms.find((s) => s.State === state.id);
return stateProgram && stateProgram["18-22 All Programs Total"] > 0;
return stateProgram && stateProgram["2018-2022 All Programs Total"] > 0;
});
if (hasData) {
setIsDataReady(true);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/legendConfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"18-22 All Programs Total": [5000000000, 10000000000, 30000000000, 40000000000],
"2018-2022 All Programs Total": [5000000000, 10000000000, 30000000000, 40000000000],
"Crop Insurance Total":[0, 500000000, 1000000000, 5000000000],
"totalNetFarmerBenefit": [0, 250000000, 750000000, 2000000000],
"Title I Total":[50000000, 300000000, 600000000, 2000000000],
Expand Down
Loading