Skip to content

Commit

Permalink
Ignore search params in RAMP
Browse files Browse the repository at this point in the history
  • Loading branch information
Sendouc committed Jan 6, 2025
1 parent ccd0583 commit 9a67145
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/components/ramp/Ramp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
};

0 comments on commit 9a67145

Please sign in to comment.