Skip to content

Commit

Permalink
Merge pull request #2194 from PolicyEngine/MaxGhenis/issue2193
Browse files Browse the repository at this point in the history
Add current law CTC calculator
  • Loading branch information
MaxGhenis authored Nov 5, 2024
2 parents 9c42c07 + 3151c25 commit e9e4a1e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PolicyEngine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import ManifestosComparison from "./applets/ManifestosComparison";
import DeveloperLayout from "./pages/DeveloperLayout";
import DeveloperHome from "./pages/DeveloperHome";
import CTCComparison from "./applets/CTCComparison";
import CTCCalculator from "./applets/CTCCalculator";
import { wrappedResponseJson } from "./data/wrappedJson";
import US2024ElectionCalculator from "./applets/US2024ElectionCalculator";

Expand Down Expand Up @@ -367,6 +368,10 @@ export default function PolicyEngine() {
path="/us/child-tax-credit-2024-election-calculator"
element={<CTCComparison />}
/>
<Route
path="/us/child-tax-credit-calculator"
element={<CTCCalculator />}
/>
<Route
path="/us/2024-election-calculator"
element={<US2024ElectionCalculator />}
Expand Down
33 changes: 33 additions & 0 deletions src/applets/CTCCalculator.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 CTCCalculator() {
const windowHeight = useWindowHeight();

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

0 comments on commit e9e4a1e

Please sign in to comment.