Skip to content

Commit

Permalink
Merge pull request #133 from Team-B1ND/hotfix/banner-no-content
Browse files Browse the repository at this point in the history
feat: Create banner no content view
  • Loading branch information
hhhello0507 authored Sep 1, 2024
2 parents bf3dfe8 + caa2362 commit f869a84
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions Projects/Feature/Source/Home/Component/BannerContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,36 @@ struct BannerContainer: View {
var body: some View {
Group {
if let data = bannerData {
TabView {
ForEach(data, id: \.self) { data in
Link(destination: URL(string: data.redirectUrl) ?? URL(string: "about:blank")!) {
CachedAsyncImage(url: URL(string: data.imageUrl)) {
$0
.resizable()
} placeholder: {
Rectangle()
.shimmer()
if data.isEmpty {
Text("배너가 없어요")
.body1(.regular)
.foreground(DodamColor.Label.assistive)
} else {
TabView {
ForEach(data, id: \.self) { data in
Link(destination: URL(string: data.redirectUrl) ?? URL(string: "about:blank")!) {
CachedAsyncImage(url: URL(string: data.imageUrl)) {
$0
.resizable()
} placeholder: {
Rectangle()
.shimmer()
}
}
}
}
.tabViewStyle(.page(indexDisplayMode: .never))
}
.tabViewStyle(.page(indexDisplayMode: .never))
} else {
DodamLoadingView.conditional(true) {
Rectangle()
.shimmer()
}
}
}
.background(DodamColor.Background.normal)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.aspectRatio(80 / 12, contentMode: .fit)
.frame(maxWidth: .infinity)
.background(DodamColor.Background.normal)
.clipShape(.large)
}
}

0 comments on commit f869a84

Please sign in to comment.