-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPostsView.swift
59 lines (46 loc) · 1.59 KB
/
PostsView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// PostsView.swift
// MobileAcebook
//
// Created by Jenny Wark on 11/10/2023.
//
import SwiftUI
struct PostsView: View {
@State private var authenticationService = AuthenticationService()
@State private var post_content: String = ""
var body: some View {
NavigationView {
VStack {
Spacer()
Text("Posts")
.font(.largeTitle)
.padding(.bottom, 20)
.accessibilityIdentifier("welcomeText")
Spacer()
Image("makers-logo")
.resizable()
.scaledToFit()
.frame(width: 200, height: 200)
.accessibilityIdentifier("makers-logo")
Spacer()
TextField("Write a post", text: $post_content)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding()
// Button(action: {
// authenticationService.createPost(post: Post(message: post_content))
// }) {
// Text("Create Post")
// }
// .accessibilityIdentifier("CreatePostButton")
Spacer()
// let Posts = authenticationService.allPosts
Spacer()
}
}
}
}
struct PostsView_Previews: PreviewProvider {
static var previews: some View {
PostsView()
}
}