refactor: Break EventView into 3 separate views
SelectedEventView EmbeddedEventView EventView
This commit is contained in:
27
damus/Views/Events/ReplyDescription.swift
Normal file
27
damus/Views/Events/ReplyDescription.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// ReplyDescription.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-23.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
// jb55 - TODO: this could be a lot better
|
||||
struct ReplyDescription: View {
|
||||
let event: NostrEvent
|
||||
let profiles: Profiles
|
||||
|
||||
var body: some View {
|
||||
Text("\(reply_desc(profiles: profiles, event: event))")
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
}
|
||||
|
||||
struct ReplyDescription_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ReplyDescription(event: test_event, profiles: test_damus_state().profiles)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user