From 6edc39791a577a500c92f32361cf1e7d2590ec37 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Tue, 9 Jan 2024 12:32:06 -0500 Subject: Implement ItemPeopleView --- Jel/Models/ViewConditionalMethod.swift | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 Jel/Models/ViewConditionalMethod.swift (limited to 'Jel/Models/ViewConditionalMethod.swift') diff --git a/Jel/Models/ViewConditionalMethod.swift b/Jel/Models/ViewConditionalMethod.swift deleted file mode 100644 index 195a8dc..0000000 --- a/Jel/Models/ViewConditionalMethod.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewConditionalMethod.swift -// Jel -// -// Created by zerocool on 12/25/23. -// - -import SwiftUI - -extension View { - /// Applies the given transform if the given condition evaluates to `true`. - /// - Parameters: - /// - condition: The condition to evaluate. - /// - transform: The transform to apply to the source `View`. - /// - Returns: Either the original `View` or the modified `View` if the condition is `true`. - @ViewBuilder func `if`(_ condition: @autoclosure () -> Bool, transform: (Self) -> Content) -> some View { - if condition() { - transform(self) - } else { - self - } - } -} -- cgit v1.2.3