diff --git a/src/requests/getMatches/getTimelineMatches.tsx b/src/requests/getMatches/getTimelineMatches.tsx index e6bf2f55..c80919d0 100644 --- a/src/requests/getMatches/getTimelineMatches.tsx +++ b/src/requests/getMatches/getTimelineMatches.tsx @@ -18,7 +18,14 @@ export type MatchesTimeline = { } export const getTimelineMatches = (sportId?: number): Promise => { - const url = new URL(`${API_ROOT}/v1/matches/timeline`) + const getTimezoneOffset = () => { + const offset = new Date().getTimezoneOffset() + if (offset === 0) return offset + return -(offset) + } + const timeZoneOffset = getTimezoneOffset() + + const url = new URL(`${API_ROOT}/v1/broadcasts/timeline/${timeZoneOffset}`) if (sportId) { url.searchParams.append('sport_id', `${sportId}`)