From a3ebc30e87c12d9972990690a07842f95401d9af Mon Sep 17 00:00:00 2001 From: yimajo Date: Sat, 17 Aug 2024 15:53:18 +0900 Subject: [PATCH 1/2] Remove redundant \.id in ForEach --- app-ios/Sources/SponsorFeature/SponsorView.swift | 6 +++--- app-ios/Sources/StaffFeature/StaffView.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app-ios/Sources/SponsorFeature/SponsorView.swift b/app-ios/Sources/SponsorFeature/SponsorView.swift index d84b71a34..dd241478f 100644 --- a/app-ios/Sources/SponsorFeature/SponsorView.swift +++ b/app-ios/Sources/SponsorFeature/SponsorView.swift @@ -18,7 +18,7 @@ public struct SponsorView: View { .foregroundStyle(AssetColors.Primary.primaryFixed.swiftUIColor) .frame(maxWidth: .infinity, alignment: .leading) - ForEach(store.platinums, id: \.id) { platinum in + ForEach(store.platinums) { platinum in Button { selectedSponsorData = platinum } label: { @@ -37,7 +37,7 @@ public struct SponsorView: View { .frame(maxWidth: .infinity, alignment: .leading) LazyVGrid(columns: Array(repeating: .init(.fixed(184)), count: 2)) { - ForEach(store.golds, id: \.id) { gold in + ForEach(store.golds) { gold in Button { selectedSponsorData = gold } label: { @@ -57,7 +57,7 @@ public struct SponsorView: View { .frame(maxWidth: .infinity, alignment: .leading) LazyVGrid(columns: Array(repeating: .init(.fixed(118)), count: 3)) { - ForEach(store.supporters, id: \.id) { supporter in + ForEach(store.supporters) { supporter in Button { selectedSponsorData = supporter } label: { diff --git a/app-ios/Sources/StaffFeature/StaffView.swift b/app-ios/Sources/StaffFeature/StaffView.swift index ff4a70181..4ad1f65e8 100644 --- a/app-ios/Sources/StaffFeature/StaffView.swift +++ b/app-ios/Sources/StaffFeature/StaffView.swift @@ -14,7 +14,7 @@ public struct StaffView: View { public var body: some View { ScrollView { LazyVStack { - ForEach(store.list, id: \.id) { staff in + ForEach(store.list) { staff in Button { selectedStaffData = staff } label: { From a7a7b3fd0a36f508e2d272396bbba6a2bddb7b84 Mon Sep 17 00:00:00 2001 From: yimajo Date: Sat, 17 Aug 2024 16:15:37 +0900 Subject: [PATCH 2/2] Remove redundant \.id in ForEach --- app-ios/Sources/SponsorFeature/SponsorView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-ios/Sources/SponsorFeature/SponsorView.swift b/app-ios/Sources/SponsorFeature/SponsorView.swift index 7fb23647d..94cfc26b3 100644 --- a/app-ios/Sources/SponsorFeature/SponsorView.swift +++ b/app-ios/Sources/SponsorFeature/SponsorView.swift @@ -51,7 +51,7 @@ public struct SponsorView: View { GridItem(.flexible(), spacing: 12, alignment: .center) } LazyVGrid(columns: gridItems, spacing: 12) { - ForEach(items, id: \.id) { item in + ForEach(items) { item in Button { selectedSponsorData = item } label: {