Skip to content

Commit

Permalink
Remove redundent view modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
lbrndnr committed Feb 19, 2021
1 parent 1f3fa9b commit d8399b3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Nuage/Views/InfiniteView/InfiniteList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,7 @@ struct InfiniteList<Element: Decodable&Identifiable&Filterable, Row: View>: View
extension View {

func header<Content: View>(@ViewBuilder _ content: () -> Content) -> some View {
self.modifier(InfiniteListHeader(header: content()))
}

}

struct InfiniteListHeader<Header: View>: ViewModifier {

var header: Header

func body(content: Content) -> some View {
content.environment(\.header, AnyView(header))
self.environment(\.header, AnyView(content()))
}

}
Expand Down

0 comments on commit d8399b3

Please sign in to comment.