From c46b641dc499c0ac83b4b75d8f5f658f731a8464 Mon Sep 17 00:00:00 2001 From: Qianru Zhang Date: Wed, 9 Aug 2023 10:05:13 -0400 Subject: [PATCH 1/4] Specification on tax revenues --- src/pages/policy/output/BudgetaryImpact.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/policy/output/BudgetaryImpact.jsx b/src/pages/policy/output/BudgetaryImpact.jsx index 376a2fedf..3629020b2 100644 --- a/src/pages/policy/output/BudgetaryImpact.jsx +++ b/src/pages/policy/output/BudgetaryImpact.jsx @@ -29,7 +29,7 @@ export default function BudgetaryImpact(props) { "Net impact", ]; let mobileLabels = ["Federal taxes", "State taxes", "Benefits", "Net"]; - if (region !== "us" && region !== "ca") { + if (region == "us" || region == "ca") { desktopLabels[0] = "Tax revenues"; mobileLabels[0] = "Taxes"; } From 5daa855617bbcdf0cf056b5ffda1b04956e7dcaf Mon Sep 17 00:00:00 2001 From: Qianru Zhang Date: Thu, 10 Aug 2023 15:16:54 -0400 Subject: [PATCH 2/4] logic update --- src/pages/policy/output/BudgetaryImpact.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/policy/output/BudgetaryImpact.jsx b/src/pages/policy/output/BudgetaryImpact.jsx index 3629020b2..d26c549b2 100644 --- a/src/pages/policy/output/BudgetaryImpact.jsx +++ b/src/pages/policy/output/BudgetaryImpact.jsx @@ -29,7 +29,14 @@ export default function BudgetaryImpact(props) { "Net impact", ]; let mobileLabels = ["Federal taxes", "State taxes", "Benefits", "Net"]; - if (region == "us" || region == "ca") { + let usInitials = [ + "al", "ak", "az", "ar", "ca", "co", "ct", "de", "fl", "ga", "hi", "id", "il", + "in", "ia", "ks", "ky", "la", "me", "md", "ma", "mi", "mn", "ms", "mo", "mt", + "ne", "nv", "nh", "nj", "nm", "ny", "nc", "nd", "oh", "ok", "or", "pa", "ri", + "sc", "sd", "tn", "tx", "ut", "vt", "va", "wa", "wv", "wi", "wy", "dc","us" + ]; + + if (!(usInitials.includes(region))){ desktopLabels[0] = "Tax revenues"; mobileLabels[0] = "Taxes"; } From c7b9a6c2875fc95b80930829b448170c28733d16 Mon Sep 17 00:00:00 2001 From: Qianru Zhang Date: Fri, 11 Aug 2023 14:29:26 -0400 Subject: [PATCH 3/4] check url instead of states array --- src/pages/policy/output/BudgetaryImpact.jsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/pages/policy/output/BudgetaryImpact.jsx b/src/pages/policy/output/BudgetaryImpact.jsx index d26c549b2..ce5c30e20 100644 --- a/src/pages/policy/output/BudgetaryImpact.jsx +++ b/src/pages/policy/output/BudgetaryImpact.jsx @@ -29,14 +29,7 @@ export default function BudgetaryImpact(props) { "Net impact", ]; let mobileLabels = ["Federal taxes", "State taxes", "Benefits", "Net"]; - let usInitials = [ - "al", "ak", "az", "ar", "ca", "co", "ct", "de", "fl", "ga", "hi", "id", "il", - "in", "ia", "ks", "ky", "la", "me", "md", "ma", "mi", "mn", "ms", "mo", "mt", - "ne", "nv", "nh", "nj", "nm", "ny", "nc", "nd", "oh", "ok", "or", "pa", "ri", - "sc", "sd", "tn", "tx", "ut", "vt", "va", "wa", "wv", "wi", "wy", "dc","us" - ]; - - if (!(usInitials.includes(region))){ + if (!window.location.pathname.includes("/us/")){ desktopLabels[0] = "Tax revenues"; mobileLabels[0] = "Taxes"; } From f3c03053d862e66a8edb35dee56f6e30392f0eaa Mon Sep 17 00:00:00 2001 From: Qianru Zhang Date: Fri, 11 Aug 2023 14:35:54 -0400 Subject: [PATCH 4/4] Pass CI test --- src/pages/policy/output/BudgetaryImpact.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/policy/output/BudgetaryImpact.jsx b/src/pages/policy/output/BudgetaryImpact.jsx index ce5c30e20..d76aca634 100644 --- a/src/pages/policy/output/BudgetaryImpact.jsx +++ b/src/pages/policy/output/BudgetaryImpact.jsx @@ -29,7 +29,7 @@ export default function BudgetaryImpact(props) { "Net impact", ]; let mobileLabels = ["Federal taxes", "State taxes", "Benefits", "Net"]; - if (!window.location.pathname.includes("/us/")){ + if (!window.location.pathname.includes("/us/")) { desktopLabels[0] = "Tax revenues"; mobileLabels[0] = "Taxes"; }