diff --git a/apps/partner-sas/components/RouteChange.tsx b/apps/partner-sas/components/RouteChange.tsx index 768bae3bd..41070e9a9 100644 --- a/apps/partner-sas/components/RouteChange.tsx +++ b/apps/partner-sas/components/RouteChange.tsx @@ -29,12 +29,13 @@ export default function RouteChange() { return } + updateRouteInfo(pathName, currentLang, searchParams) + if (hasPathOrLangChanged()) { // Scroll to top on page load whenever page is navigated to new URL (page) window.scrollTo({ top: 0, left: 0, behavior: "instant" }) } - updateRouteInfo(pathName, currentLang, searchParams) if ( hasPathOrLangChanged() || hasBookingFlowParamsChanged(isSameBookingWidgetParams) diff --git a/apps/scandic-web/components/RouteChange.tsx b/apps/scandic-web/components/RouteChange.tsx index 7bd2fc45d..24ef45690 100644 --- a/apps/scandic-web/components/RouteChange.tsx +++ b/apps/scandic-web/components/RouteChange.tsx @@ -29,12 +29,13 @@ export default function RouteChange() { return } + updateRouteInfo(pathName, currentLang, searchParams) + if (hasPathOrLangChanged()) { // Scroll to top on page load whenever page is navigated to new URL (page) window.scrollTo({ top: 0, left: 0, behavior: "instant" }) } - updateRouteInfo(pathName, currentLang, searchParams) if ( hasPathOrLangChanged() || hasBookingFlowParamsChanged(isSameBookingWidgetParams)