mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Add default parameters for post title, body, and creation date
This commit is contained in:
parent
7f920e54dc
commit
ca52aa9cef
@ -11,7 +11,7 @@ struct ContentView: View {
|
||||
.toolbar {
|
||||
NavigationLink(
|
||||
destination: PostEditor(
|
||||
post: Post(title: "Title", body: "Write your post here...", createdDate: Date())
|
||||
post: Post()
|
||||
)
|
||||
) {
|
||||
Image(systemName: "plus")
|
||||
|
@ -3,9 +3,9 @@ import WriteFreely
|
||||
|
||||
struct Post: Identifiable {
|
||||
var id = UUID()
|
||||
var title: String
|
||||
var body: String
|
||||
var createdDate: Date
|
||||
var title: String = "Title"
|
||||
var body: String = "Write your post here..."
|
||||
var createdDate: Date = Date()
|
||||
var status: PostStatus = .draft
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user