From 9a671457a20672d9acf329adb415375fcef9b113 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:45:52 +0200 Subject: [PATCH] Ignore search params in RAMP --- app/components/ramp/Ramp.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/components/ramp/Ramp.tsx b/app/components/ramp/Ramp.tsx index bc143e5d0..3fa0acf8d 100644 --- a/app/components/ramp/Ramp.tsx +++ b/app/components/ramp/Ramp.tsx @@ -15,8 +15,6 @@ export const Ramp = () => { const [rampComponentLoaded, setRampComponentLoaded] = useState(false); const location = useLocation(); - const asPath = `${location.pathname}${location.search}`; - useEffect(() => { if (!PUBLISHER_ID || !WEBSITE_ID) { logger.info("RAMP: Missing Publisher Id or Website Id"); @@ -43,10 +41,10 @@ export const Ramp = () => { // Cleanup function to handle component unmount and updating page state return () => { window.ramp.que.push(() => { - window.ramp.spaNewPage(asPath); + window.ramp.spaNewPage(location.pathname); }); }; - }, [rampComponentLoaded, asPath]); + }, [rampComponentLoaded, location.pathname]); return null; };