mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Add placeholders
This commit is contained in:
@@ -11,8 +11,10 @@ struct ContentItemView: View {
|
||||
ChannelPlaylistCell(playlist: item.playlist)
|
||||
case .channel:
|
||||
ChannelCell(channel: item.channel)
|
||||
default:
|
||||
case .video:
|
||||
VideoCell(video: item.video)
|
||||
default:
|
||||
PlaceholderCell()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
Shared/Views/PlaceholderCell.swift
Normal file
16
Shared/Views/PlaceholderCell.swift
Normal file
@@ -0,0 +1,16 @@
|
||||
import Defaults
|
||||
import SwiftUI
|
||||
|
||||
struct PlaceholderCell: View {
|
||||
var body: some View {
|
||||
VideoCell(video: .fixture)
|
||||
.redacted(reason: .placeholder)
|
||||
}
|
||||
}
|
||||
|
||||
struct PlaceholderCell_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
PlaceholderCell()
|
||||
.injectFixtureEnvironmentObjects()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user