From 891418e90fe29515364a236a2bb9c81e2a37ff65 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 15 May 2024 09:50:08 +0300 Subject: Refactor & reorganize project * LoadableState -> Result --- JuickNext/LoadableImageView.swift | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 JuickNext/LoadableImageView.swift (limited to 'JuickNext/LoadableImageView.swift') diff --git a/JuickNext/LoadableImageView.swift b/JuickNext/LoadableImageView.swift deleted file mode 100644 index 6a41dc2..0000000 --- a/JuickNext/LoadableImageView.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// LoadableImageView.swift -// tst -// -// Created by Vitaly Takmazov on 10.12.2019. -// Copyright © 2019 com.juick. All rights reserved. -// - -import SwiftUI - -struct LoadableImageView: View { - @ObservedObject var imageFetcher: ImageFetcher - - init(with urlString: String) { - imageFetcher = ImageFetcher(url: urlString) - } - - var body: some View { - if let image = Image(data: imageFetcher.data) { - return AnyView( - image.resizable() - ) - } else { - return AnyView( - ProgressView() - ) - } - } -} -- cgit v1.2.3