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 {
|
.toolbar {
|
||||||
NavigationLink(
|
NavigationLink(
|
||||||
destination: PostEditor(
|
destination: PostEditor(
|
||||||
post: Post(title: "Title", body: "Write your post here...", createdDate: Date())
|
post: Post()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
Image(systemName: "plus")
|
Image(systemName: "plus")
|
||||||
|
@ -3,9 +3,9 @@ import WriteFreely
|
|||||||
|
|
||||||
struct Post: Identifiable {
|
struct Post: Identifiable {
|
||||||
var id = UUID()
|
var id = UUID()
|
||||||
var title: String
|
var title: String = "Title"
|
||||||
var body: String
|
var body: String = "Write your post here..."
|
||||||
var createdDate: Date
|
var createdDate: Date = Date()
|
||||||
var status: PostStatus = .draft
|
var status: PostStatus = .draft
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user