yattee/Shared/Views/ContentItemView.swift

20 lines
437 B
Swift
Raw Normal View History

import Foundation
import SwiftUI
struct ContentItemView: View {
let item: ContentItem
var body: some View {
Group {
switch item.contentType {
case .playlist:
2021-10-22 23:04:03 +00:00
ChannelPlaylistCell(playlist: item.playlist)
case .channel:
ChannelCell(channel: item.channel)
default:
VideoCell(video: item.video)
}
}
}
}