Address PR Feedback
Use Switch statement to address all cases instead of if-else Signed-off-by: Swift Coder <scoder1747@gmail.com>
This commit is contained in:
@@ -59,13 +59,14 @@ struct NavDismissBarView: View {
|
|||||||
Button(action: {
|
Button(action: {
|
||||||
presentationMode.wrappedValue.dismiss()
|
presentationMode.wrappedValue.dismiss()
|
||||||
}, label: {
|
}, label: {
|
||||||
if case .profilePicImageView = navDismissBarContainer {
|
switch navDismissBarContainer {
|
||||||
|
case .profilePicImageView:
|
||||||
Image("close")
|
Image("close")
|
||||||
.frame(width: 33, height: 33)
|
.frame(width: 33, height: 33)
|
||||||
.background(.regularMaterial)
|
.background(.regularMaterial)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
}
|
|
||||||
else if case .fullScreenCarousel = navDismissBarContainer {
|
case .fullScreenCarousel:
|
||||||
Image("close")
|
Image("close")
|
||||||
.frame(width: 33, height: 33)
|
.frame(width: 33, height: 33)
|
||||||
.background(.damusBlack)
|
.background(.damusBlack)
|
||||||
|
|||||||
Reference in New Issue
Block a user