From d7ae5b62f0ef8d641c62338f21d3be1a30ecae7e Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 10 May 2026 09:44:18 -0400 Subject: [PATCH] Use production ACA calculator fallback URL --- src/components/ScrollSection.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/ScrollSection.jsx b/src/components/ScrollSection.jsx index 614faeb..a2bb780 100644 --- a/src/components/ScrollSection.jsx +++ b/src/components/ScrollSection.jsx @@ -4,9 +4,14 @@ import { useInView } from "react-intersection-observer"; import { useEffect } from "react"; import "./ScrollSection.css"; -// Calculator URL - uses environment variable or defaults to localhost for development +const DEFAULT_CALCULATOR_URL = + process.env.NODE_ENV === "development" + ? "http://localhost:8501" + : "https://policyengine-aca-calc.streamlit.app/"; + +// Calculator URL - uses environment variable or defaults by environment. const CALCULATOR_URL = - process.env.NEXT_PUBLIC_CALCULATOR_URL || "http://localhost:8501"; + process.env.NEXT_PUBLIC_CALCULATOR_URL || DEFAULT_CALCULATOR_URL; function ScrollSection({ section, index, isActive, onInView, onExploreHouseholds }) { const { ref, inView } = useInView({