Skip to content

Commit

Permalink
🔀 상품 상세 페이지 UI 버그 수정 (#132)
Browse files Browse the repository at this point in the history
* 🐛 Fix price text line breaks of Linegraph Panel.

* 🐛 Fix price text line breaks in productinfoView

* 🎨 Activate swiftformat

* ⚡️ Update productInfo Price UI

* 🎨 Activate swiftformat

* 🔥 Remove price strikethrough
  • Loading branch information
eung7 authored Mar 26, 2024
1 parent 4aebe53 commit a8f2d6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,26 @@ private struct DetailView: View {
.font(.h3)
.foregroundStyle(Color.gray900)
.frame(maxWidth: .infinity, alignment: .leading)
HStack(alignment: .bottom) {
ZStack(alignment: .bottom) {
VStack(alignment: .leading, spacing: .zero) {
Text("행사 진행 편의점")
.font(.c2)
.padding(.top, Metrics.textPaddingTop)
.frame(maxWidth: 120, alignment: .leading)
image(for: product.convenienceStore)
.padding(.top, Metrics.convenienceStoreLogoPaddingTop)
}
.frame(maxWidth: .infinity, alignment: .leading)
Spacer()
HStack(spacing: Metrics.horizontalSpacing) {
Group {
PromotionTagView(promotionTag: promotionTag(for: product.promotion))
Text("개당")
.font(.c1)
}
.padding(.bottom, -12)
PromotionTagView(promotionTag: promotionTag(for: product.promotion))
.padding(.bottom, -12)
VStack(alignment: .trailing, spacing: .zero) {
Text("\(product.price.formatted())")
Text("(\((product.price / 2).formatted())₩ per piece)")
.font(.x2)
.foregroundStyle(.gray100)
.strikethrough(color: .gray100)
.padding(.bottom, -4)
Text("\(Int(product.price / 2).formatted())")
Text("\(product.price.formatted())")
.font(.h2)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ private struct LineGraphPanelView: View {
.font(.c4)
.foregroundStyle(.gray400)
Text("\(product.price.formatted())")
.frame(maxWidth: .infinity)
.font(.b1)
.foregroundStyle(.gray900)
Rectangle()
Expand Down Expand Up @@ -216,7 +217,7 @@ private enum Metrics {
static let frameHeight: CGFloat = 226.0
static let lineGraphHeight: CGFloat = 162.0

static let panelWidth: CGFloat = 60.0
static let panelWidth: CGFloat = 70.0
static let panelHeight: CGFloat = 162.0
static let panelPoleHeight: CGFloat = 122.0
}

0 comments on commit a8f2d6d

Please sign in to comment.