From f74ed9af2ea815ca56da6d8c5a72b2aa125efaeb Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 10:52:56 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=F0=9F=8E=A8=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20json=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/SearchAPISupport/Mocks/SearchProductResponse.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APIService/Sources/SearchAPISupport/Mocks/SearchProductResponse.json b/APIService/Sources/SearchAPISupport/Mocks/SearchProductResponse.json index c52f8e6..db3acb0 100644 --- a/APIService/Sources/SearchAPISupport/Mocks/SearchProductResponse.json +++ b/APIService/Sources/SearchAPISupport/Mocks/SearchProductResponse.json @@ -16,7 +16,7 @@ "name": "롯데)펩시콜라캔355ML", "img": "https://image.woodongs.com/imgsvr/item/GD_8801056150013_007.jpg", "price": 1900, - "store": "GS25", + "store": "7-ELEVEn", "tag": "1+1", "proinfo": 0, "date": "2024-02-01T00:00:00Z", From fd4cd35faec0f9b0b7b29a56a850f82d3526b762 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 10:53:38 +0900 Subject: [PATCH 2/9] =?UTF-8?q?=E2=9C=A8=20ConvenienceStore=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=B6=94=EC=B6=9C=20?= =?UTF-8?q?=EA=B3=84=EC=82=B0=20=ED=94=84=EB=A1=9C=ED=8D=BC=ED=8B=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Sources/Entity/ConvenienceStore.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Entity/Sources/Entity/ConvenienceStore.swift b/Entity/Sources/Entity/ConvenienceStore.swift index 85f3767..aa12f37 100644 --- a/Entity/Sources/Entity/ConvenienceStore.swift +++ b/Entity/Sources/Entity/ConvenienceStore.swift @@ -5,6 +5,7 @@ // Created by 홍승현 on 1/31/24. // +import DesignSystem import Foundation import SwiftUI @@ -14,4 +15,19 @@ public enum ConvenienceStore: String, Codable, CaseIterable { case _7Eleven = "7-ELEVEn" case emart24 case ministop = "MINISTOP" + + public var image: Image { + switch self { + case .cu: + .cu + case .gs25: + .gs25 + case ._7Eleven: + ._7Eleven + case .emart24: + .emart24 + case .ministop: + .ministop + } + } } From 4465407a8fce344c01fef2f7ad324513c821ac47 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 10:53:54 +0900 Subject: [PATCH 3/9] =?UTF-8?q?=E2=9C=A8=20Entity=20Package=20iOS17?= =?UTF-8?q?=EC=9D=B4=EC=83=81=20=EC=A7=80=EC=9B=90=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Entity/Package.swift b/Entity/Package.swift index 720079c..e31bd03 100644 --- a/Entity/Package.swift +++ b/Entity/Package.swift @@ -4,6 +4,7 @@ import PackageDescription let package = Package( name: "Entity", + platforms: [.iOS(.v17)], products: [ .library( name: "Entity", From 0fc59688e6979b11dbe8439226fe6b5325044bd1 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 10:54:44 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=E2=9C=A8=20=ED=95=9C=20=EC=84=B9=EC=85=98?= =?UTF-8?q?=20=EB=8B=B9=20=EC=95=84=EC=9D=B4=ED=85=9C=EB=93=A4=EC=9D=84=20?= =?UTF-8?q?=ED=91=9C=ED=98=84=ED=95=B4=EC=A4=84=20=EB=94=95=EC=85=94?= =?UTF-8?q?=EB=84=88=EB=A6=AC=EB=A1=9C=20=EB=AA=A8=EB=8D=B8=EC=9D=84=20?= =?UTF-8?q?=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/ProductSearchScene/SearchViewModel.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift index 9039ec0..ea5050f 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift @@ -21,7 +21,7 @@ enum SearchAction { struct SearchState { var currentText = "" - var products = [SearchProduct]() + var products = [ConvenienceStore: [SearchProduct]]() var offset = 0 var hasMore = false @@ -101,10 +101,13 @@ final class SearchViewModel: SearchViewModelRepresentable { state.hasMore = paginatedModel.hasMore state.offset += 1 + + let results = Dictionary(grouping: paginatedModel.results, by: { $0.convenienceStore }) + if isReplace { - state.products = paginatedModel.results + state.products = results } else { - state.products.append(contentsOf: paginatedModel.results) +// state.products.append(contentsOf: results) } } } From 33810b9beb5913f24481f15347d554311251c6b0 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 10:55:17 +0900 Subject: [PATCH 5/9] =?UTF-8?q?=E2=9C=A8=20SearchListCardView=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20/=20Padding=EA=B0=92,=20=EB=AA=A8=EB=8D=B8=20?= =?UTF-8?q?=EA=B0=92=20=EC=A3=BC=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchListCardView.swift | 58 ++++++++++--------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift index 563808c..93e3dca 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift @@ -5,24 +5,31 @@ // Created by 김응철 on 3/1/24. // +import Entity import SwiftUI // MARK: - SearchListCardView struct SearchListCardView: View { + let product: SearchProduct + var body: some View { HStack { - SearchImageView() - SearchDetailView() + SearchImageView(product: product) + SearchDetailView(product: product) } + .padding(.vertical, Metrics.verticalPadding) + .padding(.horizontal, Metrics.horizontalPadding) } } // MARK: - SearchImageView private struct SearchImageView: View { + let product: SearchProduct + var body: some View { - AsyncImage(url: nil) { phase in + AsyncImage(url: product.imageURL) { phase in if let image = phase.image { image .resizable() @@ -38,49 +45,48 @@ private struct SearchImageView: View { } .frame(width: Metrics.totalImageSize, height: Metrics.totalImageSize) } - - enum Metrics { - static let imageSize = 70.0 - static let totalImageSize = 96.0 - } } // MARK: - SearchDetailView private struct SearchDetailView: View { + let product: SearchProduct + var body: some View { - VStack(alignment: .leading) { - PromotionTagView(promotion: .buyOneGetOneFree) - .padding(.bottom, Metrics.promotionTagViewBottomPadding) - Text(verbatim: "펩시 제로 라임 250ml") + VStack(alignment: .leading, spacing: 8.0) { + PromotionTagView(promotion: product.promotion) + Text(product.name) .font(.title1) .foregroundStyle(.gray900) - .frame(maxWidth: .infinity, minHeight: 19, maxHeight: 19, alignment: .leading) - .padding(.bottom, Metrics.productTitleBottomPadding) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.bottom, 8.0) HStack { - Text(verbatim: "1,800원") + Text("\(product.price.formatted())원") .font(.x2) .strikethrough() .foregroundColor(.gray100) - .padding(.trailing, Metrics.previousPriceTrailingPadding) - Text(verbatim: "개당") + Text("개당") .font(.c3) .foregroundColor(.gray900) - Text(verbatim: "1,250원") + Text("\(Int(product.price / 2).formatted())원") .font(.h4) .foregroundColor(.gray900) } + .padding(.zero) .frame(maxWidth: .infinity, alignment: .trailing) } } - - enum Metrics { - static let promotionTagViewBottomPadding = 8.0 - static let productTitleBottomPadding = 16.0 - static let previousPriceTrailingPadding = 10.0 - } } -#Preview { - SearchListCardView() +// MARK: - Metrics + +private enum Metrics { + static let productTitleBottomPadding = 16.0 + static let previousPriceTrailingPadding = 10.0 + + static let verticalPadding = 20.0 + static let horizontalPadding = 16.0 + + static let imageSize = 70.0 + static let totalImageSize = 96.0 } From f8a87d139bb9fa2c4b09f165f89d024f21d69b59 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 10:56:58 +0900 Subject: [PATCH 6/9] =?UTF-8?q?=E2=9C=A8=20SearchView=EC=97=90=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=A3=BC=EC=9E=85=20=EB=B0=8F=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductSearchScene/SearchView.swift | 48 +++++++++++++++---- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift index c6108f9..dee4bea 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift @@ -6,6 +6,7 @@ // import DesignSystem +import Entity import SwiftUI // MARK: - SearchView @@ -19,26 +20,42 @@ struct SearchView: View where ViewModel: SearchViewModelRepresentable var body: some View { ScrollView { - LazyVStack { - Section { - SearchListCardView() - } header: { - SearchHeaderView() + LazyVStack(spacing: .zero) { + ForEach(Array(viewModel.state.products), id: \.key) { key, items in + Section { + ForEach(items) { item in + SearchListCardView(product: item) + } + } header: { + SearchHeaderView( + store: key, + productsCount: items.count + ) + .padding(.horizontal, Metrics.horizontalPadding) + .padding(.top, Metrics.headerTopPadding) + } footer: { + Rectangle() + .foregroundStyle(.gray050) + .frame(maxWidth: .infinity, maxHeight: 10) + } } } } + .scrollIndicators(.hidden) .toolbar { ToolbarItem(placement: .principal) { - SearchTextField() + SearchTextField() } } + .environmentObject(viewModel) } } // MARK: - SearchTextField -private struct SearchTextField: View { +private struct SearchTextField: View where ViewModel: SearchViewModelRepresentable { @State private var textInput: String = "" + @EnvironmentObject private var viewModel: ViewModel var body: some View { ZStack { @@ -55,6 +72,7 @@ private struct SearchTextField: View { lineWidth: Metrics.textFieldBorderWidth ) } + .onSubmit { viewModel.trigger(.textChanged(textInput)) } Button(action: { textInput = "" }) { @@ -70,13 +88,20 @@ private struct SearchTextField: View { // MARK: - SearchHeaderView private struct SearchHeaderView: View { + let store: ConvenienceStore + let productsCount: Int + var body: some View { HStack(spacing: 8.0) { - Image._7Eleven - Text(verbatim: "3") + store.image + .resizable() + .scaledToFit() + .frame(height: 32.0) + Text("\(productsCount)") .font(.title2) + .foregroundStyle(.green500) } - .frame(maxWidth: .infinity, alignment: .leading) + .frame(maxWidth: .infinity, alignment: .bottomLeading) } } @@ -92,5 +117,8 @@ private enum Metrics { static let textFieldBorderWidth = 1.0 static let cornerRadius = 8.0 + static let horizontalPadding = 20.0 + static let headerTopPadding = 24.0 + static let removeButtonSize = 32.0 } From 2a7ab5faeffd0abb90b3cc9232e35df2680e2cdd Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 11:29:22 +0900 Subject: [PATCH 7/9] =?UTF-8?q?=F0=9F=8E=A8=20Compile=20Source=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PyeonHaeng-iOS.xcodeproj/project.pbxproj | 10 ++++------ PyeonHaeng-iOS/Resources/Localizable.xcstrings | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/PyeonHaeng-iOS.xcodeproj/project.pbxproj b/PyeonHaeng-iOS.xcodeproj/project.pbxproj index 797cc53..b53dfe1 100644 --- a/PyeonHaeng-iOS.xcodeproj/project.pbxproj +++ b/PyeonHaeng-iOS.xcodeproj/project.pbxproj @@ -20,7 +20,6 @@ BA28F1882B6155910052855E /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F1872B6155910052855E /* HomeView.swift */; }; BA28F18B2B6155BD0052855E /* ProductInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F18A2B6155BD0052855E /* ProductInfoView.swift */; }; BA28F18E2B6156420052855E /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F18D2B6156420052855E /* SettingsView.swift */; }; - BA28F1912B61566E0052855E /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F1902B61566E0052855E /* SearchView.swift */; }; BA28F19D2B61572A0052855E /* Pretendard-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA28F1932B61572A0052855E /* Pretendard-Bold.otf */; }; BA28F19E2B61572A0052855E /* Pretendard-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA28F1942B61572A0052855E /* Pretendard-SemiBold.otf */; }; BA28F1A02B61572A0052855E /* Pretendard-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA28F1962B61572A0052855E /* Pretendard-Regular.otf */; }; @@ -48,6 +47,8 @@ BAE159DE2B663A9A002DCF94 /* HomeProductSorterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAE159DD2B663A9A002DCF94 /* HomeProductSorterView.swift */; }; BAF2BEB32B61236100931AF0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = BAF2BEB22B61236100931AF0 /* Localizable.xcstrings */; }; E50176262B6A204F0098D1BE /* ProductInfoLineGraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E50176252B6A204F0098D1BE /* ProductInfoLineGraphView.swift */; }; + E5028D5C2B96BA9400B36C16 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA28F1902B61566E0052855E /* SearchView.swift */; }; + E5028D5D2B96BA9F00B36C16 /* ProductInfoDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5F2EC3F2B637D4A00EE0838 /* ProductInfoDetailView.swift */; }; E50584532B763C8C002FDACF /* ProductInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E50584522B763C8C002FDACF /* ProductInfoViewModel.swift */; }; E52F371B2B947DC8000EBAD5 /* SearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52F371A2B947DC8000EBAD5 /* SearchViewModel.swift */; }; E52F371D2B94D239000EBAD5 /* SearchViewComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52F371C2B94D239000EBAD5 /* SearchViewComponent.swift */; }; @@ -59,7 +60,6 @@ E57F2AA42B7717EA00E12B3D /* ProductInfoAPI in Frameworks */ = {isa = PBXBuildFile; productRef = E57F2AA32B7717EA00E12B3D /* ProductInfoAPI */; settings = {ATTRIBUTES = (Required, ); }; }; E57F2AA62B7717EA00E12B3D /* ProductInfoAPISupport in Frameworks */ = {isa = PBXBuildFile; productRef = E57F2AA52B7717EA00E12B3D /* ProductInfoAPISupport */; }; E57F2AA82B774CA700E12B3D /* ProductInfoDependency.swift in Sources */ = {isa = PBXBuildFile; fileRef = E57F2AA72B774CA700E12B3D /* ProductInfoDependency.swift */; }; - E5F2EC402B637D4A00EE0838 /* ProductInfoDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5F2EC3F2B637D4A00EE0838 /* ProductInfoDetailView.swift */; }; E5F2EC452B64926100EE0838 /* PromotionTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5F2EC442B64926100EE0838 /* PromotionTagView.swift */; }; /* End PBXBuildFile section */ @@ -558,9 +558,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E5028D5D2B96BA9F00B36C16 /* ProductInfoDetailView.swift in Sources */, + E5028D5C2B96BA9400B36C16 /* SearchView.swift in Sources */, BAE159DA2B65FC35002DCF94 /* HomeProductListView.swift in Sources */, - E5F2EC402B637D4A00EE0838 /* ProductInfoDetailView.swift in Sources */, - E5F2EC402B637D4A00EE0838 /* ProductInfoDetailView.swift in Sources */, BA402F7E2B85E31800E86AAD /* ConvenienceSelectBottomSheetView.swift in Sources */, BA28F1852B6155810052855E /* OnboardingView.swift in Sources */, BAB5CF272B6B7CF3008B24BF /* HomeViewModel.swift in Sources */, @@ -570,8 +570,6 @@ E5462C662B65677B00E9FDF2 /* PromotionTag.swift in Sources */, E50584532B763C8C002FDACF /* ProductInfoViewModel.swift in Sources */, BAB720342B9325F200C2CA1A /* PromotionSelectBottomSheetView.swift in Sources */, - BA28F1912B61566E0052855E /* ProductSearchView.swift in Sources */, - BA28F1912B61566E0052855E /* SearchView.swift in Sources */, 9CE4B4732B6F0BA3002DC446 /* OnboardingViewModel.swift in Sources */, 9CE4B4752B6F78E8002DC446 /* OnboardingPageControl.swift in Sources */, BA28F18E2B6156420052855E /* SettingsView.swift in Sources */, diff --git a/PyeonHaeng-iOS/Resources/Localizable.xcstrings b/PyeonHaeng-iOS/Resources/Localizable.xcstrings index 9bf9a66..2646db6 100644 --- a/PyeonHaeng-iOS/Resources/Localizable.xcstrings +++ b/PyeonHaeng-iOS/Resources/Localizable.xcstrings @@ -39,6 +39,9 @@ } } } + }, + "%lld" : { + }, "1+1" : { "localizations" : { From 73b951b6bca4e150faad172b2d4e4e51ac750cc2 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 11:51:41 +0900 Subject: [PATCH 8/9] =?UTF-8?q?=F0=9F=94=A5=20Entity=EC=99=80=20DesignSyst?= =?UTF-8?q?em=EA=B0=84=EC=9D=98=20=EC=9D=98=EC=A1=B4=EC=84=B1=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Package.swift | 1 - Entity/Sources/Entity/ConvenienceStore.swift | 16 ---------------- .../Scenes/ProductSearchScene/SearchView.swift | 17 ++++++++++++++++- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Entity/Package.swift b/Entity/Package.swift index e31bd03..720079c 100644 --- a/Entity/Package.swift +++ b/Entity/Package.swift @@ -4,7 +4,6 @@ import PackageDescription let package = Package( name: "Entity", - platforms: [.iOS(.v17)], products: [ .library( name: "Entity", diff --git a/Entity/Sources/Entity/ConvenienceStore.swift b/Entity/Sources/Entity/ConvenienceStore.swift index aa12f37..85f3767 100644 --- a/Entity/Sources/Entity/ConvenienceStore.swift +++ b/Entity/Sources/Entity/ConvenienceStore.swift @@ -5,7 +5,6 @@ // Created by 홍승현 on 1/31/24. // -import DesignSystem import Foundation import SwiftUI @@ -15,19 +14,4 @@ public enum ConvenienceStore: String, Codable, CaseIterable { case _7Eleven = "7-ELEVEn" case emart24 case ministop = "MINISTOP" - - public var image: Image { - switch self { - case .cu: - .cu - case .gs25: - .gs25 - case ._7Eleven: - ._7Eleven - case .emart24: - .emart24 - case .ministop: - .ministop - } - } } diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift index dee4bea..d4dd0c6 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift @@ -93,7 +93,7 @@ private struct SearchHeaderView: View { var body: some View { HStack(spacing: 8.0) { - store.image + convenienceImageView() .resizable() .scaledToFit() .frame(height: 32.0) @@ -103,6 +103,21 @@ private struct SearchHeaderView: View { } .frame(maxWidth: .infinity, alignment: .bottomLeading) } + + private func convenienceImageView() -> Image { + switch store { + case .cu: + .cu + case .gs25: + .gs25 + case ._7Eleven: + ._7Eleven + case .emart24: + .emart24 + case .ministop: + .ministop + } + } } // MARK: - Metrics From f4db6eb75d09011693438ac85a4f66780caa9ad2 Mon Sep 17 00:00:00 2001 From: EungCheol Kim Date: Tue, 5 Mar 2024 13:54:02 +0900 Subject: [PATCH 9/9] =?UTF-8?q?=F0=9F=94=A5=20=EC=9A=94=EC=B2=AD=20?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - padding(.zero) 제거 - 주석 처리 제거 --- PyeonHaeng-iOS/Resources/Localizable.xcstrings | 3 --- .../Sources/Scenes/ProductSearchScene/SearchListCardView.swift | 1 - .../Sources/Scenes/ProductSearchScene/SearchView.swift | 2 +- .../Sources/Scenes/ProductSearchScene/SearchViewModel.swift | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/PyeonHaeng-iOS/Resources/Localizable.xcstrings b/PyeonHaeng-iOS/Resources/Localizable.xcstrings index 2646db6..9bf9a66 100644 --- a/PyeonHaeng-iOS/Resources/Localizable.xcstrings +++ b/PyeonHaeng-iOS/Resources/Localizable.xcstrings @@ -39,9 +39,6 @@ } } } - }, - "%lld" : { - }, "1+1" : { "localizations" : { diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift index 93e3dca..5f0b926 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchListCardView.swift @@ -72,7 +72,6 @@ private struct SearchDetailView: View { .font(.h4) .foregroundColor(.gray900) } - .padding(.zero) .frame(maxWidth: .infinity, alignment: .trailing) } } diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift index d4dd0c6..e16bcde 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchView.swift @@ -97,7 +97,7 @@ private struct SearchHeaderView: View { .resizable() .scaledToFit() .frame(height: 32.0) - Text("\(productsCount)") + Text(verbatim: "\(productsCount)") .font(.title2) .foregroundStyle(.green500) } diff --git a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift index ea5050f..0068a90 100644 --- a/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift +++ b/PyeonHaeng-iOS/Sources/Scenes/ProductSearchScene/SearchViewModel.swift @@ -106,8 +106,6 @@ final class SearchViewModel: SearchViewModelRepresentable { if isReplace { state.products = results - } else { -// state.products.append(contentsOf: results) } } }