Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Last active July 6, 2022 08:05
Show Gist options
  • Save koss-lebedev/5262e8b0c792e1765faaf4da323f1bef to your computer and use it in GitHub Desktop.
Save koss-lebedev/5262e8b0c792e1765faaf4da323f1bef to your computer and use it in GitHub Desktop.
type Props = {
items: Array<Video | LiveStream>
}
const VideoList = ({ items }) => {
return (
<ul>
{items.map(item => {
if ('coverUrl' in item) {
// it's a video
return <Thumbnail video={item} />
} else {
// it's a live stream, but what can we do with it?
}
})}
</ul>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment