diff --git a/SodaLive/Sources/Content/All/ByTheme/ContentAllByThemeView.swift b/SodaLive/Sources/Content/All/ByTheme/ContentAllByThemeView.swift index f723ecc..9cc1c26 100644 --- a/SodaLive/Sources/Content/All/ByTheme/ContentAllByThemeView.swift +++ b/SodaLive/Sources/Content/All/ByTheme/ContentAllByThemeView.swift @@ -12,12 +12,6 @@ struct ContentAllByThemeView: View { let themeId: Int - let columns = [ - GridItem(.flexible(), alignment: .top), - GridItem(.flexible(), alignment: .top), - GridItem(.flexible(), alignment: .top) - ] - var body: some View { NavigationView { BaseView(isLoading: $viewModel.isLoading) { @@ -88,10 +82,25 @@ struct ContentAllByThemeView: View { .padding(.vertical, 13.3) .padding(.horizontal, 20) + let horizontalPadding: CGFloat = 16 + let gridSpacing: CGFloat = 16 + let itemSize = (screenSize().width - (horizontalPadding * 2) - gridSpacing) / 2 + ScrollView(.vertical, showsIndicators: false) { - LazyVGrid(columns: columns, spacing: 32) { + LazyVGrid( + columns: Array( + repeating: GridItem( + .flexible(), + spacing: gridSpacing, + alignment: .topLeading + ), + count: 2 + ), + alignment: .leading, + spacing: gridSpacing + ) { ForEach(0..