|
|
|
@ -20,7 +20,6 @@ struct RankingView: View {
|
|
|
|
|
.textStyle(weight: .bold, color: AllInColors.grey500Color, size: 25)
|
|
|
|
|
.padding([.top,.bottom], 15)
|
|
|
|
|
|
|
|
|
|
if !viewModel.friends.isEmpty {
|
|
|
|
|
HStack {
|
|
|
|
|
if viewModel.friends.indices.contains(0) {
|
|
|
|
|
ZStack {
|
|
|
|
@ -121,8 +120,12 @@ struct RankingView: View {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.padding([.leading, .trailing, .top], 20)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if viewModel.friends.count == 1 {
|
|
|
|
|
EmptyInfo(emoji:"👀", title: String(localized: "empty_ranking_title"), explain: String(localized: "empty_ranking_explain")).padding(.top, 40)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
ScrollView(showsIndicators: false) {
|
|
|
|
|
ForEach(viewModel.friends.indices.dropFirst(2), id: \.self) { index in
|
|
|
|
|
let friend = viewModel.friends[index]
|
|
|
|
@ -135,6 +138,7 @@ struct RankingView: View {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.padding(.top, 10)
|
|
|
|
|
}
|
|
|
|
|
Spacer()
|
|
|
|
|
}
|
|
|
|
|
.edgesIgnoringSafeArea(.bottom).background(AllInColors.backgroundColor)
|
|
|
|
|