fix hover trailers toggle - suppress cached video key when pref disabled
This commit is contained in:
@@ -60,8 +60,11 @@ export function useHoverTrailer(
|
||||
return pickPriority(a.type) - pickPriority(b.type)
|
||||
})[0]
|
||||
|
||||
// If the feature is disabled, suppress the key even when cached data
|
||||
// exists from a previous session. Otherwise PosterCard will mount the
|
||||
// iframe the moment the user hovers.
|
||||
return {
|
||||
videoKey: trailer?.key || null,
|
||||
ready: armed && (movieQ.isFetched || tvQ.isFetched),
|
||||
videoKey: enabled && armed && trailer?.key ? trailer.key : null,
|
||||
ready: enabled && armed && (movieQ.isFetched || tvQ.isFetched),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user