
export default function getRandomTopic(allTopics, minVideos=4) {
  const validTopics = allTopics.filter(topic => topic.items >= minVideos);
  return validTopics[Math.floor(Math.random() * validTopics.length)];
}