yattee/Shared/Views/ContentItemView.swift
2022-10-27 18:03:57 +02:00

22 lines
496 B
Swift

import Foundation
import SwiftUI
struct ContentItemView: View {
let item: ContentItem
var body: some View {
Group {
switch item.contentType {
case .video:
VideoCell(video: item.video)
case .playlist:
ChannelPlaylistCell(playlist: item.playlist)
case .channel:
ChannelCell(channel: item.channel)
default:
PlaceholderCell()
}
}
}
}