Skip to content

Commit

Permalink
Merge pull request #2219 from PolicyEngine/PavelMakarchuk/issue2218
Browse files Browse the repository at this point in the history
Add SALT/AMT calculator
  • Loading branch information
MaxGhenis authored Nov 21, 2024
2 parents a9654ea + d2105c1 commit 98cd144
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PolicyEngine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import CTCComparison from "./applets/CTCComparison";
import CTCCalculator from "./applets/CTCCalculator";
import { wrappedResponseJson } from "./data/wrappedJson";
import US2024ElectionCalculator from "./applets/US2024ElectionCalculator";
import SaltAMTCalculator from "./applets/SaltAMTCalculator";

const PolicyPage = lazy(() => import("./pages/PolicyPage"));
const HouseholdPage = lazy(() => import("./pages/HouseholdPage"));
Expand Down Expand Up @@ -376,6 +377,7 @@ export default function PolicyEngine() {
path="/us/2024-election-calculator"
element={<US2024ElectionCalculator />}
/>
<Route path="/us/salt-amt-calculator" element={<SaltAMTCalculator />} />

{/* Redirect for unrecognized paths */}
<Route path="*" element={<Navigate to={`/${countryId}`} />} />
Expand Down
33 changes: 33 additions & 0 deletions src/applets/SaltAMTCalculator.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Header from "../layout/Header";
import { Helmet } from "react-helmet";
import style from "../style";
import { useWindowHeight } from "../hooks/useWindow";

export default function SaltAMTCalculator() {
const windowHeight = useWindowHeight();

return (
<>
<Helmet>
<title>SALT-AMT Calculator | PolicyEngine</title>
</Helmet>
<Header />
<div
style={{
display: "flex",
justifyContent: "center",
height: windowHeight - style.spacing.HEADER_HEIGHT,
width: "100vw",
}}
>
<iframe
src="https://policyengine-salt-amt-calculator.streamlit.app/?embedded=true"
title="SALT-AMT Policy Reform Calculator"
height={`calc(100vh - ${style.spacing.HEADER_HEIGHT})`}
width="100%"
style={{ overflow: "hidden" }}
/>
</div>
</>
);
}

0 comments on commit 98cd144

Please sign in to comment.