import SwiftUI struct PostFeedSettingsView: View { @Environment(\.language) private var language @EnvironmentObject private var content: Content var body: some View { ScrollView { VStack(alignment: .leading) { Text("Post Feed Settings") .font(.largeTitle) .bold() Text("Change the way the posts are displayed") .foregroundStyle(.secondary) .padding(.bottom, 30) Text("Content Width") .font(.headline) IntegerField("", number: $content.settings.posts.contentWidth) .textFieldStyle(.roundedBorder) .frame(maxWidth: 400) Text("The maximum width of the content the post feed (in pixels)") .foregroundStyle(.secondary) .padding(.bottom) Text("Posts Per Page") .font(.headline) IntegerField("", number: $content.settings.posts.postsPerPage) .textFieldStyle(.roundedBorder) .frame(maxWidth: 400) Text("The maximum number of posts displayed on a single page") .foregroundStyle(.secondary) .padding(.bottom) LocalizedPostFeedSettingsView(settings: content.settings.localized(in: language)) } } } } #Preview { PostFeedSettingsView() .environmentObject(Content.mock) .padding() }