diff --git a/src/features/MatchPage/hooks/useVideoData.tsx b/src/features/MatchPage/hooks/useVideoData.tsx index f1da2696..7dca18f3 100644 --- a/src/features/MatchPage/hooks/useVideoData.tsx +++ b/src/features/MatchPage/hooks/useVideoData.tsx @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react' import isNull from 'lodash/isNull' import isEmpty from 'lodash/isEmpty' +import filter from 'lodash/filter' import type { LiveVideos, Videos } from 'requests' import { getLiveVideos, getVideos } from 'requests' @@ -21,7 +22,8 @@ export const useVideoData = () => { const live = await getLiveVideos(sportType, matchId) if (isNull(live) || isEmpty(live)) { const videosResponse = await getVideos(sportType, matchId) - setVideos(videosResponse) + const filteredVideosResponseByAbc = filter(videosResponse, (vid) => vid.abc !== 1) + setVideos(filteredVideosResponseByAbc) } else { setLiveVideos(live) } diff --git a/src/requests/getVideos.tsx b/src/requests/getVideos.tsx index e503737d..9c7ba720 100644 --- a/src/requests/getVideos.tsx +++ b/src/requests/getVideos.tsx @@ -2,6 +2,7 @@ import { API_ROOT, SportTypes } from 'config' import { callApi } from 'helpers' type Video = { + abc: number, duration: number, match_id: number, name: string,