diff --git a/Sora/Views/SearchView/SearchResultsGrid.swift b/Sora/Views/SearchView/SearchResultsGrid.swift index e45cd4f..d5e0758 100644 --- a/Sora/Views/SearchView/SearchResultsGrid.swift +++ b/Sora/Views/SearchView/SearchResultsGrid.swift @@ -28,49 +28,47 @@ struct SearchResultsGrid: View { } var body: some View { - ScrollView { - LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 12), count: columnsCount), spacing: 12) { - ForEach(items) { item in - NavigationLink(destination: MediaInfoView(title: item.title, imageUrl: item.imageUrl, href: item.href, module: selectedModule)) { - ZStack { - KFImage(URL(string: item.imageUrl)) - .resizable() - .aspectRatio(0.72, contentMode: .fill) - .frame(width: cellWidth, height: cellWidth * 1.5) - .cornerRadius(12) - .clipped() - - VStack { + LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 12), count: columnsCount), spacing: 12) { + ForEach(items) { item in + NavigationLink(destination: MediaInfoView(title: item.title, imageUrl: item.imageUrl, href: item.href, module: selectedModule)) { + ZStack { + KFImage(URL(string: item.imageUrl)) + .resizable() + .aspectRatio(0.72, contentMode: .fill) + .frame(width: cellWidth, height: cellWidth * 1.5) + .cornerRadius(12) + .clipped() + + VStack { + Spacer() + HStack { + Text(item.title) + .lineLimit(2) + .foregroundColor(.white) + .multilineTextAlignment(.leading) Spacer() - HStack { - Text(item.title) - .lineLimit(2) - .foregroundColor(.white) - .multilineTextAlignment(.leading) - Spacer() - } - .padding(12) - .background( - LinearGradient( - colors: [ - .black.opacity(0.7), - .black.opacity(0.0) - ], - startPoint: .bottom, - endPoint: .top - ) - .shadow(color: .black, radius: 4, x: 0, y: 2) - ) } - .frame(width: cellWidth) + .padding(12) + .background( + LinearGradient( + colors: [ + .black.opacity(0.7), + .black.opacity(0.0) + ], + startPoint: .bottom, + endPoint: .top + ) + .shadow(color: .black, radius: 4, x: 0, y: 2) + ) } - .clipShape(RoundedRectangle(cornerRadius: 12)) - .padding(4) + .frame(width: cellWidth) } + .clipShape(RoundedRectangle(cornerRadius: 12)) + .padding(4) } } - .padding(.top) - .padding() } + .padding(.top) + .padding() } }