You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
497 B
19 lines
497 B
import { useQueryClient } from 'react-query'
|
|
|
|
import { querieKeys } from 'config'
|
|
|
|
import type { MatchScore } from 'requests'
|
|
|
|
import { useMatchPageStore } from 'features/MatchPage/store'
|
|
|
|
export const useVideoBounds = () => {
|
|
const { profile: matchProfile } = useMatchPageStore()
|
|
|
|
const client = useQueryClient()
|
|
|
|
const matchScore = client.getQueryData<MatchScore>(querieKeys.matchScore)
|
|
|
|
const videoBounds = matchScore?.video_bounds || matchProfile?.video_bounds
|
|
|
|
return videoBounds
|
|
}
|
|
|