diff --git a/SwiftUIView.swift b/SwiftUIView.swift index a27f624..d12e3bd 100644 --- a/SwiftUIView.swift +++ b/SwiftUIView.swift @@ -1,6 +1,6 @@ // // SwiftUIView.swift -// +// // // Created by Isabella Sulisufi on 16/08/2024. // diff --git a/TaskManager.xcodeproj/project.pbxproj b/TaskManager.xcodeproj/project.pbxproj index 6253905..8cff047 100644 --- a/TaskManager.xcodeproj/project.pbxproj +++ b/TaskManager.xcodeproj/project.pbxproj @@ -9,10 +9,10 @@ /* Begin PBXBuildFile section */ EE00D2BC2C6F8D65004FF048 /* TaskViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE00D2BB2C6F8D65004FF048 /* TaskViewModel.swift */; }; EE019E182C9460C600A8B764 /* TaskModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE019E172C9460C600A8B764 /* TaskModel.swift */; }; + EE3AE1712CC69970001A80C1 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE3AE1702CC69970001A80C1 /* Router.swift */; }; EE4BB9C72B88F49F00FFF4F2 /* TextStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE4BB9C62B88F49F00FFF4F2 /* TextStyles.swift */; }; EE59B6B42C342680003D59DF /* AboutPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE59B6B32C342680003D59DF /* AboutPageView.swift */; }; EE996DF12B88E1EE0036470C /* Spacing.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE996DF02B88E1EE0036470C /* Spacing.swift */; }; - EEA7106C2C90808600785086 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEA7106B2C90808600785086 /* MainView.swift */; }; EEA7106E2C908CA000785086 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEA7106D2C908CA000785086 /* HomeView.swift */; }; EED772132B7BC0C6007BDA4A /* TaskManagerApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = EED772122B7BC0C6007BDA4A /* TaskManagerApp.swift */; }; EED772152B7BC0C6007BDA4A /* AddTaskView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EED772142B7BC0C6007BDA4A /* AddTaskView.swift */; }; @@ -23,10 +23,10 @@ /* Begin PBXFileReference section */ EE00D2BB2C6F8D65004FF048 /* TaskViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskViewModel.swift; sourceTree = ""; }; EE019E172C9460C600A8B764 /* TaskModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskModel.swift; sourceTree = ""; }; + EE3AE1702CC69970001A80C1 /* Router.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; EE4BB9C62B88F49F00FFF4F2 /* TextStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextStyles.swift; sourceTree = ""; }; EE59B6B32C342680003D59DF /* AboutPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutPageView.swift; sourceTree = ""; }; EE996DF02B88E1EE0036470C /* Spacing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Spacing.swift; sourceTree = ""; }; - EEA7106B2C90808600785086 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; EEA7106D2C908CA000785086 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; EED7720F2B7BC0C6007BDA4A /* TaskManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TaskManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; EED772122B7BC0C6007BDA4A /* TaskManagerApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskManagerApp.swift; sourceTree = ""; }; @@ -49,7 +49,6 @@ EE019E152C94604D00A8B764 /* Views */ = { isa = PBXGroup; children = ( - EEA7106B2C90808600785086 /* MainView.swift */, EE59B6B32C342680003D59DF /* AboutPageView.swift */, EED772142B7BC0C6007BDA4A /* AddTaskView.swift */, EEA7106D2C908CA000785086 /* HomeView.swift */, @@ -100,6 +99,7 @@ EE996DF02B88E1EE0036470C /* Spacing.swift */, EED772162B7BC0C8007BDA4A /* Assets.xcassets */, EED772182B7BC0C8007BDA4A /* Preview Content */, + EE3AE1702CC69970001A80C1 /* Router.swift */, ); path = TaskManager; sourceTree = ""; @@ -184,13 +184,13 @@ files = ( EEA7106E2C908CA000785086 /* HomeView.swift in Sources */, EE59B6B42C342680003D59DF /* AboutPageView.swift in Sources */, + EE3AE1712CC69970001A80C1 /* Router.swift in Sources */, EE00D2BC2C6F8D65004FF048 /* TaskViewModel.swift in Sources */, EE019E182C9460C600A8B764 /* TaskModel.swift in Sources */, EED772152B7BC0C6007BDA4A /* AddTaskView.swift in Sources */, EE4BB9C72B88F49F00FFF4F2 /* TextStyles.swift in Sources */, EED772132B7BC0C6007BDA4A /* TaskManagerApp.swift in Sources */, EE996DF12B88E1EE0036470C /* Spacing.swift in Sources */, - EEA7106C2C90808600785086 /* MainView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/TaskManager/Model/TaskModel.swift b/TaskManager/Model/TaskModel.swift index 31b9603..044ec13 100644 --- a/TaskManager/Model/TaskModel.swift +++ b/TaskManager/Model/TaskModel.swift @@ -7,26 +7,26 @@ import Foundation -//struct TaskModel { +// struct TaskModel { // var id: UUID = UUID() // var title: String // var description: String? -// +// // var startDate: Date // var dueDate: Date -// +// // var category: Category // var isCompleted: Bool -// +// -//} +// } enum Category: String, CaseIterable { - case school = "School" - case work = "Work" - case personal = "Personal" - case fitness = "Fitness" - } + case school = "School" + case work = "Work" + case personal = "Personal" + case fitness = "Fitness" +} struct Task { let title: String diff --git a/TaskManager/Router.swift b/TaskManager/Router.swift new file mode 100644 index 0000000..74e9c3f --- /dev/null +++ b/TaskManager/Router.swift @@ -0,0 +1,30 @@ +// +// Router.swift +// TaskManager +// +// Created by Isabella Sulisufi on 21/10/2024. +// + +import SwiftUI + +final class Router: ObservableObject { + + public enum Destination: Codable, Hashable { + case addTask + case aboutPage + } + + @Published var navPath = NavigationPath() + + func navigate(to destination: Destination) { + navPath.append(destination) + } + + func navigateBack() { + navPath.removeLast() + } + + func navigateToRoot() { + navPath.removeLast(navPath.count) + } +} diff --git a/TaskManager/Spacing.swift b/TaskManager/Spacing.swift index d4c37ba..c299dbd 100644 --- a/TaskManager/Spacing.swift +++ b/TaskManager/Spacing.swift @@ -8,28 +8,28 @@ import SwiftUI struct Spacing { - + static let none: CGFloat = 0 - + static let micro: CGFloat = 4 - + static let tiny: CGFloat = 8 - + static let small: CGFloat = 12 - + static let standard: CGFloat = 16 - + static let medium: CGFloat = 20 - + static let considerable: CGFloat = 22 - + static let spacious: CGFloat = 24 - + static let large: CGFloat = 30 - + static let extensive: CGFloat = 32 - + static let big: CGFloat = 36 - + static let huge: CGFloat = 40 } diff --git a/TaskManager/TaskManagerApp.swift b/TaskManager/TaskManagerApp.swift index 457f480..7d7c343 100644 --- a/TaskManager/TaskManagerApp.swift +++ b/TaskManager/TaskManagerApp.swift @@ -9,9 +9,21 @@ import SwiftUI @main struct TaskManagerApp: App { + @ObservedObject var router = Router() var body: some Scene { WindowGroup { - MainView() + NavigationStack(path: $router.navPath) { + HomeView(viewModel: TaskViewModel(router: router)) + .navigationDestination(for: Router.Destination.self) { destination in + switch destination { + case .addTask: + AddTaskView(viewModel: TaskViewModel(router: router)) + case .aboutPage: + AboutPageView(viewModel: TaskViewModel(router: router)) + } + } + } + .environmentObject(router) } } } diff --git a/TaskManager/TextStyles.swift b/TaskManager/TextStyles.swift index 44cdd40..bf0903a 100644 --- a/TaskManager/TextStyles.swift +++ b/TaskManager/TextStyles.swift @@ -11,22 +11,22 @@ struct TextStyles { // Style for Titles static func titleStyle() -> some ViewModifier { return TextStyleModifier(font: .custom("Gill Sans", size: Spacing.large), - color: Color("DarkPurple"), - applyPadding: false) + color: Color("DarkPurple"), + applyPadding: false) } // Style for Descriptions static func descriptionStyle() -> some ViewModifier { return TextStyleModifier(font: .custom("Gill Sans", size: Spacing.spacious), - color: Color("DarkPurple"), - applyPadding: false) + color: Color("DarkPurple"), + applyPadding: false) } - + // Style for Bullet Points static func bulletPointStyle() -> some ViewModifier { return TextStyleModifier(font: .custom("Gill Sans", size: Spacing.considerable), - color: Color("DarkPurple"), - applyPadding: true) + color: Color("DarkPurple"), + applyPadding: true) } struct TextStyleModifier: ViewModifier { @@ -42,5 +42,3 @@ struct TextStyles { } } } - - diff --git a/TaskManager/ViewModel/TaskViewModel.swift b/TaskManager/ViewModel/TaskViewModel.swift index 8587278..e9ffef4 100644 --- a/TaskManager/ViewModel/TaskViewModel.swift +++ b/TaskManager/ViewModel/TaskViewModel.swift @@ -8,10 +8,8 @@ import SwiftUI class TaskViewModel: ObservableObject { - - @Published var taskList: [Task] = [] - + @Published var selectedDate: Date = Date() @Published var startDate: Date = Date() @@ -19,11 +17,15 @@ class TaskViewModel: ObservableObject { @Published var isTaskComplete: Bool = false @Published var taskTitle: String = "" @Published var taskDescription: String = "" - - + + var router: Router + + init(router: Router) { + self.router = router + } + var dropdownOptions = Category.allCases.map { $0.rawValue } - - + var task1 = Task( title: "Science homework", description: "Biology presentation on anatomy", @@ -33,34 +35,33 @@ class TaskViewModel: ObservableObject { isComplete: false ) - func emptyTaskListArray() { taskList.removeAll() print(taskList) } - + func addToTaskListArray() { let newTask = Task( title: taskTitle, description: taskDescription, startDate: startDate, dueDate: selectedDate, - category:selectedCategory, + category: selectedCategory, isComplete: isTaskComplete ) taskList.append(newTask) print(taskList) } - + func handleButtonToggle() { isTaskComplete.toggle() - } -} - -//@Published var message: String = "" + func navigateToViewAllTasks() { + router.navigate(to: .aboutPage) + } -//check if tasks array is empty -//if it is then -//message = + func navigateAddTask() { + router.navigate(to: .addTask) + } +} diff --git a/TaskManager/Views/AboutPageView.swift b/TaskManager/Views/AboutPageView.swift index 9061c70..1d81c44 100644 --- a/TaskManager/Views/AboutPageView.swift +++ b/TaskManager/Views/AboutPageView.swift @@ -8,104 +8,82 @@ import SwiftUI struct AboutPageView: View { + @ObservedObject var viewModel: TaskViewModel + var body: some View { - + VStack { + HStack { + Image("LogoImage") + .resizable() + .scaledToFit() + .frame(width: 200, height: 100) + } + .padding(.top) + + Text("This is ToTask!") + .modifier(TextStyles.descriptionStyle()) + + Text("An app which allows you to easily add, update, delete and view your tasks") + .modifier(TextStyles.descriptionStyle()) + .multilineTextAlignment(.center) + VStack { - HStack { - Image("LogoImage") - .resizable() - .scaledToFit() - .frame(width: 200, height: 100) - } - .padding(.top) - - - Text("This is ToTask!") - .modifier(TextStyles.descriptionStyle()) - - - Text("An app which allows you to easily add, update, delete and view your tasks") - .modifier(TextStyles.descriptionStyle()) + Text("\u{2022} **Time Tracking**: Set due dates to easily monitor task progress.") + .modifier(TextStyles.bulletPointStyle()) .multilineTextAlignment(.center) - - - VStack{ - Text("\u{2022} **Time Tracking**: Set due dates to easily monitor task progress.") - .modifier(TextStyles.bulletPointStyle()) - .multilineTextAlignment(.center) - - Text("\u{2022} **Organised Categories**: Categorise tasks for effortless organisation and quick access.") - .modifier(TextStyles.bulletPointStyle()) - .multilineTextAlignment(.center) - - - Text("\u{2022} **Daily Overview**: Instantly view all tasks due today on your homepage.") - .modifier(TextStyles.bulletPointStyle()) - .multilineTextAlignment(.center) - } - .padding(.top) - - Spacer() - - Text("Start Today and Add A Task!") + + Text("\u{2022} **Organised Categories**: Categorise tasks for effortless " + + "organisation and quick access.") + .modifier(TextStyles.bulletPointStyle()) + .multilineTextAlignment(.center) + + Text("\u{2022} **Daily Overview**: Instantly view all tasks due today on your homepage.") + .modifier(TextStyles.bulletPointStyle()) .multilineTextAlignment(.center) - - .modifier(TextStyles.descriptionStyle()) - - + } + .padding(.top) + + Spacer() + + Text("Start Today and Add A Task!") + .multilineTextAlignment(.center) + .modifier(TextStyles.descriptionStyle()) + + Spacer() + + HStack { + // View All Tasks Button + Button { + viewModel.navigateAddTask() + } label: { + Text("View All Tasks") + .font(Font.custom("NotoSansOriya", size: Spacing.medium)) + .foregroundColor(Color.cPink) + .padding(Spacing.standard) + .background(Color("DarkestPurple")) + .cornerRadius(Spacing.medium) + } + Spacer() - - HStack{ - - - // View All Tasks Button - - NavigationLink { - AddTaskView() - - } label: { - Text("View All Tasks") - .font(Font.custom("NotoSansOriya", size: Spacing.medium)) - .foregroundColor(Color.cPink) - .padding(Spacing.standard) - .background(Color("DarkestPurple")) - .cornerRadius(Spacing.medium) - } - - - Spacer() - - - //Add Task Button - NavigationLink { - AddTaskView() - - } label: { - Image(systemName: "plus.circle") - .font(.system(size: Spacing.large, weight: .bold)) - .foregroundColor(Color("DarkestPurple")) - Text("Add Task") - .font(Font.custom("NotoSansOriya", size: Spacing.medium)) - .foregroundColor(Color("DarkestPurple")) - .baselineOffset(-5) - } - .padding(12.0) - .background(Color.cPink) - .cornerRadius(Spacing.medium) - + + // Add Task Button + Button { + viewModel.navigateAddTask() + } label: { + Image(systemName: "plus.circle") + .font(.system(size: Spacing.large, weight: .bold)) + .foregroundColor(Color("DarkestPurple")) + Text("Add Task") + .font(Font.custom("NotoSansOriya", size: Spacing.medium)) + .foregroundColor(Color("DarkestPurple")) + .baselineOffset(-5) } - - - + .padding(12.0) } - .padding(Spacing.spacious) - .background(Color("Rose")) - - - + } } } -#Preview { - AboutPageView() -} +// #Preview { +// AboutPageView() +// } diff --git a/TaskManager/Views/AddTaskView.swift b/TaskManager/Views/AddTaskView.swift index 99a11b2..b585310 100644 --- a/TaskManager/Views/AddTaskView.swift +++ b/TaskManager/Views/AddTaskView.swift @@ -6,97 +6,90 @@ import SwiftUI struct AddTaskView: View { - @ObservedObject var viewModel = TaskViewModel() - + @ObservedObject var viewModel: TaskViewModel + var body: some View { - NavigationView { VStack { - - //Image and back arrow + // Image and back arrow HStack { Image(systemName: "arrow.left") .font(.system(size: Spacing.big, weight: .bold)) .foregroundColor(Color("Purple2")) - + Image("LogoImage") .resizable() .scaledToFit() .frame(width: 200, height: 100) } .padding(.top) - - - //Entered text section + + // Entered text section VStack(alignment: .leading) { TextField("Current Task Name", text: $viewModel.taskTitle) .font(.custom("NotoSansOriya", size: Spacing.large)) .foregroundColor(Color("DarkPurple")) - + TextField("Task Description", text: $viewModel.taskDescription) .font(.custom("NotoSansOriya", size: Spacing.spacious)) .foregroundColor(Color("DarkPurple")) } .padding(Spacing.spacious) - - - //Due date and category + + // Due date and category VStack(alignment: .center, spacing: 30) { DatePicker("Due Date", selection: $viewModel.selectedDate, displayedComponents: .date) .foregroundColor(Color("DarkPurple")) .font(.custom("NotoSansOriya", size: Spacing.considerable)) - + HStack { Text("Category") .foregroundColor(Color("DarkPurple")) .font(.custom("NotoSansOriya", size: Spacing.considerable)) Spacer() - + Picker("Select a category", selection: $viewModel.selectedCategory) { - ForEach(viewModel.dropdownOptions, id: \.self) { dropdownOption in - Text(dropdownOption) - } - } + ForEach(viewModel.dropdownOptions, id: \.self) { dropdownOption in + Text(dropdownOption) + } + } .pickerStyle(MenuPickerStyle()) } - - - //Buttons + + // Buttons HStack { Button(action: { viewModel.handleButtonToggle() - }) { + }, label: { Image(systemName: viewModel.isTaskComplete ? "checkmark.circle.fill" : "circle") .resizable() .frame(width: Spacing.large, height: Spacing.large) .foregroundColor(viewModel.isTaskComplete ? Color.cPink : Color.cPink) - } - + }) + Text("Mark As Complete?") .foregroundColor(Color("DarkPurple")) .font(Font.custom("NotoSansOriya", size: Spacing.medium)) .baselineOffset(-3) Spacer() } - - //Save Changes Button + + // Save Changes Button Button(action: { viewModel.addToTaskListArray() - - }) { + }, label: { Text("Save Changes") .font(Font.custom("NotoSansOriya", size: Spacing.medium)) .foregroundColor(Color("DarkestPurple")) .padding(12.0) .background(Color.cPink) .cornerRadius(Spacing.medium) - } - - + }) + // Delete Button Button(action: { viewModel.emptyTaskListArray() - }) { + }, label: { HStack(alignment: .center) { Image(systemName: "delete.left") .font(.system(size: Spacing.large, weight: .bold)) @@ -104,12 +97,12 @@ struct AddTaskView: View { Text("Delete Task") .font(Font.custom("NotoSansOriya", size: Spacing.medium)) .foregroundColor(Color.cPink) - .baselineOffset(-5) + .baselineOffset(-5) } .padding(11.0) .background(Color("DarkestPurple")) .cornerRadius(Spacing.medium) - } + }) Spacer() } .padding(.horizontal, Spacing.spacious) @@ -119,7 +112,6 @@ struct AddTaskView: View { } } - -#Preview { - AddTaskView() -} +// #Preview { +// AddTaskView() +// } diff --git a/TaskManager/Views/HomeView.swift b/TaskManager/Views/HomeView.swift index dc2b5f1..73284d0 100644 --- a/TaskManager/Views/HomeView.swift +++ b/TaskManager/Views/HomeView.swift @@ -8,35 +8,36 @@ import SwiftUI struct HomeView: View { - - @ObservedObject var viewModel = TaskViewModel() - + @ObservedObject var viewModel: TaskViewModel + @EnvironmentObject var router: Router + var body: some View { VStack { + // Logo Image("LogoImage") .resizable() .scaledToFit() .frame(width: 200, height: 100) + + // Welcome Text VStack(alignment: .leading) { - - Text("Hi, Welcome Back!") .font(.custom("Gill Sans", size: Spacing.extensive)) .foregroundColor(Color("DarkPurple")) .padding(.bottom, Spacing.small) - + Text("Tasks for Today") .font(.custom("Gill Sans", size: Spacing.large)) .foregroundColor(Color("DarkPurple")) .padding(.bottom, Spacing.micro) - + Text(Date().formatted(date: .complete, time: .omitted)) .font(.custom("Gill Sans", size: Spacing.medium)) .foregroundColor(Color("DarkPurple")) - + Spacer() - - //Card + + // Card HStack { VStack(alignment: .leading) { HStack { @@ -54,20 +55,20 @@ struct HomeView: View { .cornerRadius(25) } .padding(.trailing, Spacing.small) - + Text(viewModel.task1.description ?? "") .font(.custom("Gill Sans", size: Spacing.standard)) .foregroundColor(Color("DarkPurple")) .padding(.bottom, 6.0) - + Text(viewModel.task1.dueDate.formatted(date: .abbreviated, time: .omitted)) .font(.custom("Gill Sans", size: 13)) .foregroundColor(Color("DarkPurple")) .padding(.bottom, Spacing.small) - + HStack { - NavigationLink { - AddTaskView() + Button { + viewModel.navigateAddTask() } label: { Image(systemName: "checkmark.circle") .font(.system(size: Spacing.medium, weight: .bold)) @@ -77,9 +78,9 @@ struct HomeView: View { .foregroundColor(Color("DarkPurple")) } Spacer() - - NavigationLink { - AddTaskView() + + Button { + viewModel.navigateAddTask() } label: { Image(systemName: "pencil.circle") .font(.system(size: Spacing.medium, weight: .bold)) @@ -90,20 +91,51 @@ struct HomeView: View { } } .padding([.bottom, .trailing], Spacing.standard) - - + } .padding(.leading, Spacing.standard) Spacer() - + } .padding(.top, 10.0) - .background(Color("Cream")) .overlay( RoundedRectangle(cornerRadius: Spacing.small) .stroke(Color("Purple3"), lineWidth: 1) ) + + Spacer() + + // Buttons + HStack { + // View All Tasks Button + Button("View All Tasks") { + viewModel.navigateToViewAllTasks() + } + .font(Font.custom("NotoSansOriya", size: Spacing.medium)) + .foregroundColor(Color.cPink) + .padding(Spacing.standard) + .background(Color("DarkestPurple")) + .cornerRadius(Spacing.medium) + + Spacer() + + // Add Task Button + Button { + router.navigate(to: .addTask) + } label: { + Image(systemName: "plus.circle") + .font(.system(size: Spacing.large, weight: .bold)) + .foregroundColor(Color("DarkestPurple")) + Text("Add Task") + .font(Font.custom("NotoSansOriya", size: Spacing.medium)) + .foregroundColor(Color("DarkestPurple")) + .baselineOffset(-5) + } + .padding(12.0) + .background(Color.cPink) + .cornerRadius(Spacing.medium) + } Spacer() } } @@ -111,9 +143,8 @@ struct HomeView: View { .background(Color("Rose")) Spacer() } - } -#Preview { - HomeView() -} +// #Preview { +// HomeView() +// } diff --git a/TaskManager/Views/MainView.swift b/TaskManager/Views/MainView.swift deleted file mode 100644 index d1ed104..0000000 --- a/TaskManager/Views/MainView.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// HomePageView.swift -// TaskManager -// -// Created by Isabella Sulisufi on 10/09/2024. -// - -import SwiftUI - -struct MainView: View { - var body: some View { - TabView { - HomeView() - .tabItem { - Label("Home", systemImage: "house") - } - - - AddTaskView() - .tabItem { - Label("Task List", systemImage: "list.bullet") - } - - - AboutPageView() - .tabItem { - Label("Help", systemImage: "questionmark") - } - } - } -} - - -#Preview { - MainView() -} - -