Add getRelatedVideos helper

This commit is contained in:
Sam Carlton 2022-06-09 15:55:53 -05:00
parent 6c3c4c1ca7
commit 770af94ec2

View file

@ -82,3 +82,14 @@ export function videoBenchmarksRelatedToApp ( app, videoListSet ) {
}) })
} }
export function getRelatedVideos ( { listing, videoListSet, appListSet } = {} ) {
const listingType = getAppType( listing )
if ( listingType === 'video' ) {
return videosRelatedToVideo( listing, appListSet, videoListSet )
}
return videoBenchmarksRelatedToApp( listing, videoListSet )
}