1
0
Преглед на файлове

Fix issue with not being able to pause video (#4367)

Bartosz Dryl преди 1 година
родител
ревизия
5a4c752e48
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 1 0
      packages/atlas/src/hooks/useSegmentAnalytics.ts
  2. 4 2
      packages/atlas/src/views/viewer/VideoView/VideoView.tsx

+ 1 - 0
packages/atlas/src/hooks/useSegmentAnalytics.ts

@@ -50,6 +50,7 @@ export const useSegmentAnalytics = () => {
   const trackVideoView = useCallback(
     (videoId: string, channelId: string, channelTitle: string, description: string, isNft: boolean) => {
       analytics.track('video viewed', {
+        videoId,
         channelId,
         channelTitle,
         description,

+ 4 - 2
packages/atlas/src/views/viewer/VideoView/VideoView.tsx

@@ -259,6 +259,8 @@ export const VideoView: FC = () => {
     setShareDialogOpen(true)
   }
 
+  const isNft = !!nftWidgetProps
+
   const handleAddVideoView = useCallback(() => {
     if (!videoId || !channelId) {
       return
@@ -276,9 +278,9 @@ export const VideoView: FC = () => {
       channelId ?? 'no data',
       channelName ?? 'no data',
       videoDescription ?? 'no data',
-      !!nftWidgetProps
+      isNft
     )
-  }, [addVideoView, channelId, videoId, channelName, videoDescription, nftWidgetProps, trackVideoView])
+  }, [videoId, channelId, addVideoView, trackVideoView, channelName, videoDescription, isNft])
 
   if (error) {
     return <ViewErrorFallback />