diff --git a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExploreShortcutView.swift b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExploreShortcutView.swift index 39dd83be..73741917 100644 --- a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExploreShortcutView.swift +++ b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExploreShortcutView.swift @@ -126,13 +126,11 @@ extension ExploreShortcutView { ForEach(Array(shortcuts.enumerated()), id:\.offset) { index, shortcut in if index < 3 { - let data = NavigationReadShortcutType(shortcutID:shortcut.id, - navigationParentView: .shortcuts) ShortcutCell(shortcut: shortcut, rankNumber: index + 1, navigationParentView: .shortcuts) - .navigationLinkRouter(data: data) + .navigationLinkRouter(data: shortcut) } } .background(Color.shortcutsZipBackground) @@ -158,15 +156,11 @@ extension ExploreShortcutView { ScrollView(.horizontal, showsIndicators: false) { HStack { ForEach(viewModel.fetchShortcuts(by: category).prefix(7), id: \.self) { shortcut in - let data = NavigationReadShortcutType( - shortcutID: shortcut.id, - navigationParentView: .shortcuts) - ShortcutCardCell( - categoryShortcutIcon: shortcut.sfSymbol, - categoryShortcutName: shortcut.title, - categoryShortcutColor: shortcut.color) - .navigationLinkRouter(data: data) + ShortcutCardCell(categoryShortcutIcon: shortcut.sfSymbol, + categoryShortcutName: shortcut.title, + categoryShortcutColor: shortcut.color) + .navigationLinkRouter(data: shortcut) } } .padding(.horizontal, 16) diff --git a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListCategoryShortcutView.swift b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListCategoryShortcutView.swift index 872540c0..0e138458 100644 --- a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListCategoryShortcutView.swift +++ b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListCategoryShortcutView.swift @@ -19,14 +19,12 @@ struct ListCategoryShortcutView: View { LazyVStack(spacing: 0) { ForEach(viewModel.shortcuts, id: \.self) { shortcut in - let data = NavigationReadShortcutType(shortcut: shortcut, - shortcutID: shortcut.id, - navigationParentView: .shortcuts) - ShortcutCell(shortcut: shortcut, - navigationParentView: .shortcuts) - .navigationLinkRouter(data: data) - .listRowInsets(EdgeInsets()) - .listRowSeparator(.hidden) + + ShortcutCell(shortcut: shortcut, navigationParentView: .shortcuts) + .navigationLinkRouter(data: shortcut) + .listRowInsets(EdgeInsets()) + .listRowSeparator(.hidden) + } } .padding(.bottom, 44) diff --git a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListShortcutView.swift b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListShortcutView.swift index 9aeac984..df6fe15c 100644 --- a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListShortcutView.swift +++ b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ListShortcutView.swift @@ -50,13 +50,11 @@ struct ListShortcutView: View { @ViewBuilder private func makeShortcutCellList(_ shortcuts: [Shortcuts]) -> some View { ForEach(shortcuts, id: \.self) { shortcut in - let navigationData = NavigationReadShortcutType(shortcut: shortcut, - shortcutID: shortcut.id, - navigationParentView: .shortcuts) + ShortcutCell(shortcut: shortcut, sectionType: viewModel.sectionType, navigationParentView: .shortcuts) - .navigationLinkRouter(data: navigationData) + .navigationLinkRouter(data: shortcut) } }