Skip to content

Commit

Permalink
Check if hashUrlSearchParams has p[meta_page_view_id] (#6710)
Browse files Browse the repository at this point in the history
* check if hashUrlSearchParams has p[meta_page_view_id]

* check if pageviewId is correct

* manually check the value of pageviewId

* manually check the value of pageviewId
  • Loading branch information
GHaberis authored Jan 21, 2025
1 parent 53371f4 commit 8ba7a37
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions support-frontend/assets/pages/[countryGroupId]/events/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ export function Events({ geoId }: Props) {

const pageviewId = getPageViewId();

if (!pageviewId) {
logException('pageviewId not available on event listing');
}

const hashUrlSearchParams = new URLSearchParams({
'p[meta_page_view_id]': pageviewId,
'p[meta_region_id]': geoId,
Expand All @@ -124,6 +120,13 @@ export function Events({ geoId }: Props) {
hashUrlSearchParams.toString(),
)}`;

if (
!hashUrlSearchParams.has('p[meta_page_view_id]') ||
hashUrlSearchParams.get('p[meta_page_view_id]') !== pageviewId
) {
logException('hashUrlSearchParams pageviewId mismatch');
}

const embedUrl = `${ticketTailorUrl}/${eventId}/book${presetDataUrl}`;

return (
Expand Down

0 comments on commit 8ba7a37

Please sign in to comment.