라이브 - 배너 광고 위치 변경

This commit is contained in:
Yu Sung 2023-09-16 00:10:58 +09:00
parent 36aa167e1d
commit 0294bbf223
3 changed files with 31 additions and 65 deletions

View File

@ -33,12 +33,6 @@ struct LiveView: View {
.padding(.bottom, 40) .padding(.bottom, 40)
} }
BannerAdView(adUnitId: LIVE_BANNER_AD_UNIT_ID)
.frame(
width: screenSize().width,
height: GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(screenSize().width).size.height
)
if viewModel.recommendChannelItems.count > 0 { if viewModel.recommendChannelItems.count > 0 {
SectionRecommendChannelView( SectionRecommendChannelView(
items: viewModel.isFollowingList ? items: viewModel.isFollowingList ?
@ -46,21 +40,25 @@ struct LiveView: View {
viewModel.recommendChannelItems, viewModel.recommendChannelItems,
isFollowingList: $viewModel.isFollowingList isFollowingList: $viewModel.isFollowingList
) )
.padding(.top, 40)
} }
if viewModel.liveNowItems.count > 0 { BannerAdView(adUnitId: LIVE_BANNER_AD_UNIT_ID)
SectionLiveNowView( .frame(
items: viewModel.liveNowItems, width: screenSize().width,
onClickParticipant: { height: GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(screenSize().width).size.height
viewModel.enterRoom(roomId: $0)
},
onTapCreateLive: {
AppState.shared.setAppStep(step: .createLive(timeSettingMode: .NOW, onSuccess: onCreateSuccess))
}
) )
.padding(.top, 40) .padding(.top, 40)
}
SectionLiveNowView(
items: viewModel.liveNowItems,
onClickParticipant: {
viewModel.enterRoom(roomId: $0)
},
onTapCreateLive: {
AppState.shared.setAppStep(step: .createLive(timeSettingMode: .NOW, onSuccess: onCreateSuccess))
}
)
.padding(.top, 40)
if viewModel.eventBannerItems.count > 0 { if viewModel.eventBannerItems.count > 0 {
SectionEventBannerView(items: viewModel.eventBannerItems) SectionEventBannerView(items: viewModel.eventBannerItems)
@ -72,20 +70,18 @@ struct LiveView: View {
.padding(.top, 40) .padding(.top, 40)
} }
if viewModel.liveReservationItems.count > 0 { SectionLiveReservationView(
SectionLiveReservationView( items: viewModel.liveReservationItems,
items: viewModel.liveReservationItems, onClickCancel: { viewModel.getSummary() },
onClickCancel: { viewModel.getSummary() }, onClickStart: { roomId in processStart(roomId: roomId) },
onClickStart: { roomId in processStart(roomId: roomId) }, onClickReservation: { roomId in
onClickReservation: { roomId in viewModel.reservationLiveRoom(roomId: roomId)
viewModel.reservationLiveRoom(roomId: roomId) },
}, onTapCreateLive: {
onTapCreateLive: { AppState.shared.setAppStep(step: .createLive(timeSettingMode: .RESERVATION, onSuccess: onCreateSuccess))
AppState.shared.setAppStep(step: .createLive(timeSettingMode: .RESERVATION, onSuccess: onCreateSuccess)) }
} )
) .padding(.top, 40)
.padding(.top, 40)
}
} }
} }
.frame(width: geo.size.width, height: geo.size.height) .frame(width: geo.size.width, height: geo.size.height)

View File

@ -70,27 +70,12 @@ struct SectionLiveNowView: View {
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
Text("🙀지금 참여가능한 라이브가 없습니다.\n직접 라이브를 만들어 보세요!") Text("🙀지금 참여가능한 라이브가 없습니다.\n채널을 팔로잉 하고 라이브 알림을 받아 보세요.")
.font(.custom(Font.medium.rawValue, size: 10.7)) .font(.custom(Font.medium.rawValue, size: 10.7))
.foregroundColor(Color(hex: "bbbbbb")) .foregroundColor(Color(hex: "bbbbbb"))
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.padding(.top, 8) .padding(.vertical, 8)
HStack(spacing: 0) {
Image("ic_plus_no_bg")
.resizable()
.frame(width: 33.3, height: 33.3, alignment: .center)
Text("라이브 만들기")
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(Color.white)
}
.frame(width: 200, height: 33.3, alignment: .center)
.background(Color(hex: "9970ff"))
.cornerRadius(4.7)
.padding(.top, 10.7)
.onTapGesture { onTapCreateLive() }
} }
.padding(.vertical, 16.7) .padding(.vertical, 16.7)
.frame(width: screenSize().width - 26.7) .frame(width: screenSize().width - 26.7)

View File

@ -93,27 +93,12 @@ struct SectionLiveReservationView: View {
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
Text("지금 예약중인 라이브가 없습니다.\n직접 라이브를 만들어 보세요!") Text("지금 예약중인 라이브가 없습니다.\n채널을 팔로잉 하고 라이브 알림을 받아 보세요.")
.font(.custom(Font.medium.rawValue, size: 10.7)) .font(.custom(Font.medium.rawValue, size: 10.7))
.foregroundColor(Color(hex: "bbbbbb")) .foregroundColor(Color(hex: "bbbbbb"))
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.padding(.top, 8) .padding(.vertical, 8)
HStack(spacing: 0) {
Image("ic_plus_no_bg")
.resizable()
.frame(width: 33.3, height: 33.3, alignment: .center)
Text("라이브 만들기")
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(Color.white)
}
.frame(width: 200, height: 33.3, alignment: .center)
.background(Color(hex: "9970ff"))
.cornerRadius(4.7)
.padding(.top, 10.7)
.onTapGesture { onTapCreateLive() }
} }
.padding(.vertical, 16.7) .padding(.vertical, 16.7)
.frame(width: screenSize().width - 26.7) .frame(width: screenSize().width - 26.7)