@playpilot/tpi 8.36.0 → 8.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "8.36.0",
3
+ "version": "8.36.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { fetchParticipantsForTitle } from '$lib/api/participants'
2
+ import { fetchParticipantBySid, fetchParticipantsForTitle } from '$lib/api/participants'
3
3
  import { TrackingEvent } from '$lib/enums/TrackingEvent'
4
4
  import { getLinkInjectionElements, getLinkInjectionsParentElement, getPageText } from '$lib/injectionElements'
5
5
  import { t } from '$lib/localization'
@@ -42,11 +42,13 @@
42
42
  return participantsSortedByCount.map(({ participant }) => participant)
43
43
  }
44
44
 
45
- function onclick(event: MouseEvent, participant: ParticipantData): void {
45
+ async function onclick(event: MouseEvent, participant: ParticipantData): Promise<void> {
46
46
  track(TrackingEvent.ParticipantClick, null, { title_source: title.original_title || title.title, participant: participant.name })
47
47
 
48
48
  if (!window.PlayPilotLinkInjections?.config?.open_tpi_links_in_explore || window.location.href.includes(window.PlayPilotLinkInjections.config.explore_navigation_path || '')) {
49
- openModal({ event, type: 'participant', data: participant })
49
+ const fetchedParticipant = await fetchParticipantBySid(participant.sid)
50
+
51
+ openModal({ event, type: 'participant', data: fetchedParticipant })
50
52
  return
51
53
  }
52
54