Ignore search params in RAMP
Some checks failed
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

This commit is contained in:
Kalle
2025-01-06 20:45:52 +02:00
parent ccd0583c67
commit 9a671457a2

View File

@@ -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;
};