diff --git a/src/pages/policy/output/CliffImpact.jsx b/src/pages/policy/output/CliffImpact.jsx index 3b6471a61..70f86ebb4 100644 --- a/src/pages/policy/output/CliffImpact.jsx +++ b/src/pages/policy/output/CliffImpact.jsx @@ -165,7 +165,7 @@ function description(metadata) { return (

The cliff rate is the share of households whose net income falls if each - adult earned an additional {metadata.currency}2,000. The cliff gap is the + adult earned an additional {metadata.currency}1,000. The cliff gap is the sum of the losses incurred by all households on a cliff if their income rose in this way.{" "} diff --git a/src/pages/policy/output/FetchAndDisplayImpact.jsx b/src/pages/policy/output/FetchAndDisplayImpact.jsx index e7a2c3143..57cfed6ef 100644 --- a/src/pages/policy/output/FetchAndDisplayImpact.jsx +++ b/src/pages/policy/output/FetchAndDisplayImpact.jsx @@ -1,19 +1,13 @@ import { useEffect, useRef, useState } from "react"; -import { - DisplayError, - DisplayImpact, - DisplayWait, - LowLevelDisplay, -} from "./Display"; +import { DisplayError, DisplayImpact, DisplayWait } from "./Display"; import { useSearchParams } from "react-router-dom"; import { asyncApiCall, copySearchParams, apiCall } from "../../../api/call"; -import ErrorPage from "layout/ErrorPage"; import { defaultYear } from "data/constants"; import { areObjectsSame } from "../../../data/areObjectsSame"; import { updateUserPolicy } from "../../../api/userPolicies"; import useCountryId from "../../../hooks/useCountryId"; import { wrappedResponseJson } from "../../../data/wrappedJson"; -// import LoadingCentered from "layout/LoadingCentered"; +import LoadingCentered from "layout/LoadingCentered"; /** * @@ -58,11 +52,6 @@ export function FetchAndDisplayImpact(props) { function computingCallback(data) { // Position in queue message only occurs with average_time // in the response object; if this is present, enable message - /* - if (data.average_time && data.message) { - setQueueMsg(data.message); - } - */ if (data.queue_position) { setQueuePos(data.queue_position); } @@ -223,14 +212,9 @@ export function FetchAndDisplayCliffImpact(props) { const reformPolicyId = searchParams.get("reform"); const baselinePolicyId = searchParams.get("baseline"); - // Remove the following eslint ignore when cliff impacts are restored - // eslint-disable-next-line no-unused-vars const [impact, setImpact] = useState(null); const [error, setError] = useState(null); - const { - metadata, - // policy, - } = props; + const { metadata, policy } = props; useEffect(() => { if (!!region && !!timePeriod && !!reformPolicyId && !!baselinePolicyId) { const url = `/${metadata.countryId}/economy/${reformPolicyId}/over/${baselinePolicyId}?region=${region}&time_period=${timePeriod}&target=cliff`; @@ -283,24 +267,9 @@ export function FetchAndDisplayCliffImpact(props) { return ; } - // Remove the below block when cliff impacts are reinstated - return ( - - - - ); - - /* if (!impact) { return ; } - return ( - - ); - */ + return ; } diff --git a/src/pages/policy/output/ImpactTypes.jsx b/src/pages/policy/output/ImpactTypes.jsx index b9dbf8894..60b79070c 100644 --- a/src/pages/policy/output/ImpactTypes.jsx +++ b/src/pages/policy/output/ImpactTypes.jsx @@ -1,7 +1,7 @@ import averageImpactByDecile from "./decile/AverageImpactByDecile"; import averageImpactByWealthDecile from "./decile/AverageImpactByWealthDecile"; import budgetaryImpact from "./budget/BudgetaryImpact"; -// import cliffImpact from "./CliffImpact"; +import cliffImpact from "./CliffImpact"; import deepPovertyImpact from "./poverty/DeepPovertyImpact"; import deepPovertyImpactByGender from "./poverty/DeepPovertyImpactByGender"; import detailedBudgetaryImpact from "./budget/DetailedBudgetaryImpact"; @@ -43,7 +43,7 @@ const map = { "povertyImpact.deep.byGender": deepPovertyImpactByGender, "povertyImpact.regular.byRace": povertyImpactByRace, inequalityImpact: inequalityImpact, - // cliffImpact: cliffImpact, + cliffImpact: cliffImpact, "laborSupplyImpact.earnings.overall.absolute": LaborSupplyResponseAbsolute, "laborSupplyImpact.earnings.overall.relative": LaborSupplyResponseRelative, "laborSupplyImpact.earnings.byDecile.relative.total": diff --git a/src/pages/policy/output/PolicyOutput.jsx b/src/pages/policy/output/PolicyOutput.jsx index 92175413f..f8e53e7ab 100644 --- a/src/pages/policy/output/PolicyOutput.jsx +++ b/src/pages/policy/output/PolicyOutput.jsx @@ -122,7 +122,6 @@ export default function PolicyOutput(props) { {...props} showPolicyImpactPopup={showPolicyImpactPopup} /> - ; ); } diff --git a/src/pages/policy/output/tree.js b/src/pages/policy/output/tree.js index 34a0ee27a..1d1a620e0 100644 --- a/src/pages/policy/output/tree.js +++ b/src/pages/policy/output/tree.js @@ -14,7 +14,7 @@ export const policyOutputs = { genderDeepPovertyImpact: "Deep poverty impact by sex", racialPovertyImpact: "Poverty impact by race and ethnicity", inequalityImpact: "Income inequality impact", - // cliffImpact: "Cliff impact", + cliffImpact: "Cliff impact", "laborSupplyImpact.byDecile.relative.total": "Labor supply impact by decile (relative)", "laborSupplyImpact.byDecile.relative.income": @@ -158,6 +158,10 @@ export function getPolicyOutputTree(countryId) { name: "policyOutput.inequalityImpact", label: "Inequality impact", }, + { + name: "policyOutput.cliffImpact", + label: "Cliff impact", + }, { name: "policyOutput.laborSupplyImpact", label: