Mercurial > public > simoleon
diff Simoleon/UI/Sidebar.swift @ 167:1940db1ef321
Minor changes
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Sat, 11 Sep 2021 16:30:40 +0200 |
parents | 84137052813d |
children | f4e0c414cf6d |
line wrap: on
line diff
--- a/Simoleon/UI/Sidebar.swift Sat Sep 11 16:30:32 2021 +0200 +++ b/Simoleon/UI/Sidebar.swift Sat Sep 11 16:30:40 2021 +0200 @@ -1,43 +1,40 @@ -//// -//// Sidebar.swift -//// Simoleon -//// -//// Created by Dennis Concepción Martín on 18/07/2021. -//// // -//import SwiftUI +// Sidebar.swift +// Simoleon +// +// Created by Dennis Concepción Martín on 18/07/2021. // -//struct Sidebar: View { -// @Environment(\.managedObjectContext) private var viewContext -// @FetchRequest(sortDescriptors: []) private var defaultCurrency: FetchedResults<DefaultCurrency> -// -// var body: some View { -// List { -// NavigationLink(destination: Conversion()) { -// Label("Convert", systemImage: "arrow.counterclockwise.circle") -// } -// .accessibilityIdentifier("NavigateToConversion") -// -// NavigationLink(destination: Favorites()) { -// Label("Favorites", systemImage: "star") -// } -// .accessibilityIdentifier("NavigateToFavorites") -// -// NavigationLink(destination: Settings()) { -// Label("Settings", systemImage: "gear") -// } -// .accessibilityIdentifier("NavigateToSettings") -// } -// .listStyle(SidebarListStyle()) -// .navigationTitle("Categories") -// .accessibilityIdentifier("Sidebar") -// } -//} -// -//struct Sidebar_Previews: PreviewProvider { -// static var previews: some View { -// NavigationView { -// Sidebar() -// } -// } -//} + +import SwiftUI + +struct Sidebar: View { + var body: some View { + List { + NavigationLink(destination: ConversionView()) { + Label("Convert", systemImage: "arrow.counterclockwise.circle") + } + .accessibilityIdentifier("NavigateToConversion") + + NavigationLink(destination: FavoritesView()) { + Label("Favorites", systemImage: "star") + } + .accessibilityIdentifier("NavigateToFavorites") + + NavigationLink(destination: AboutView()) { + Label("About", systemImage: "gear") + } + .accessibilityIdentifier("NavigateToSettings") + } + .listStyle(SidebarListStyle()) + .navigationTitle("Categories") + .accessibilityIdentifier("Sidebar") + } +} + +struct Sidebar_Previews: PreviewProvider { + static var previews: some View { + NavigationView { + Sidebar() + } + } +}