Skip to content

Commit

Permalink
feat: #140 바텀시트 나오는 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hooni0918 committed Jan 22, 2025
1 parent 879d9b5 commit b8c6f36
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions Spoony-iOS/Spoony-iOS/Source/Feature/Home/Home.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,33 @@ struct Home: View {
Spacer()
}

if !viewModel.focusedPlaces.isEmpty {
VStack(spacing: 4) {
PlaceCard(
places: viewModel.focusedPlaces,
currentPage: $currentPage
)
if viewModel.focusedPlaces.count > 1 {
PageIndicator(
currentPage: currentPage,
pageCount: viewModel.focusedPlaces.count
// 바텀 영역 뷰 로직
Group {
if !viewModel.focusedPlaces.isEmpty {
// 지도 핀이 선택되었을 때 PlaceCard 표시
VStack(spacing: 4) {
PlaceCard(
places: viewModel.focusedPlaces,
currentPage: $currentPage
)
if viewModel.focusedPlaces.count > 1 {
PageIndicator(
currentPage: currentPage,
pageCount: viewModel.focusedPlaces.count
)
}
}
}
.padding(.bottom, 34)
.transition(.move(edge: .bottom))
} else if navigationManager.currentLocation != nil {
BottomSheetListView(viewModel: viewModel)
} else {
if !viewModel.pickList.isEmpty {
BottomSheetListView(viewModel: viewModel)
.padding(.bottom, 34)
.transition(.move(edge: .bottom))
} else {
FixedBottomSheetView()
// 지도 핀이 선택되지 않았을 때의 바텀시트 로직
if navigationManager.currentLocation != nil {
BottomSheetListView(viewModel: viewModel)
} else if !viewModel.pickList.isEmpty {
BottomSheetListView(viewModel: viewModel)
} else {
FixedBottomSheetView()
}
}
}
}
Expand Down

0 comments on commit b8c6f36

Please sign in to comment.