diff LazyBear/Views/Company/Helpers/InsiderRosterList.swift @ 447:8621ba6fd457

Fixes #48
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Wed, 23 Jun 2021 10:54:47 +0200
parents 7d1c4dc8d1d8
children
line wrap: on
line diff
--- a/LazyBear/Views/Company/Helpers/InsiderRosterList.swift	Tue Jun 22 19:57:08 2021 +0200
+++ b/LazyBear/Views/Company/Helpers/InsiderRosterList.swift	Wed Jun 23 10:54:47 2021 +0200
@@ -9,29 +9,18 @@
 
 struct InsiderRosterList: View {
     var insiderRoster: [InsiderRosterModel]
-    @Binding var isPresented: Bool
         
     var body: some View {
-        NavigationView {
-            ScrollView(showsIndicators: false) {
-                VStack {
-                    let totalPositions =  insiderRoster.map { $0.position ?? 0 }.reduce(0, +)  /// Get total shares owned by top 10 insiders
-                    ForEach(insiderRoster, id: \.self) { insider in
-                        let percentageOfWidth = Double(insider.position ?? 0) / Double(totalPositions)   /// Compute percentage of ownership for each insider
-                        InsiderRosterRow(insider: insider, percentageOfWidth: CGFloat(percentageOfWidth))
-                        Divider()
-                    }
-                }
-                .padding()
-            }
-            .navigationTitle("Top 10 Insiders")
-            .toolbar {
-                ToolbarItem(placement: .cancellationAction) {
-                    Button(action: { self.isPresented.toggle() }) {
-                        Image(systemName: "multiply")
-                    }
+        ScrollView(showsIndicators: false) {
+            VStack {
+                let totalPositions =  insiderRoster.map { $0.position ?? 0 }.reduce(0, +)  /// Get total shares owned by top 10 insiders
+                ForEach(insiderRoster, id: \.self) { insider in
+                    let percentageOfWidth = Double(insider.position ?? 0) / Double(totalPositions)   /// Compute percentage of ownership for each insider
+                    InsiderRosterRow(insider: insider, percentageOfWidth: CGFloat(percentageOfWidth))
+                    Divider()
                 }
             }
+            .padding()
         }
     }
 }
@@ -47,7 +36,6 @@
                         reportDate: 12345
                     )
                 ]
-            , isPresented: .constant(true)
         )
     }
 }