Skip to content

Commit

Permalink
✨ [#279] Feature / 바텀시트 및 수상 날짜 옵셔널로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsh153 committed Sep 4, 2023
1 parent b71520c commit b37f616
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ final class InputPrizeInfoIntent: InputPrizeInfoIntentProtocol {
errorSet[index].insert(.type)
}

if prize.prizeAt.description.isEmpty, errorSet[safe: index] != nil {
if prize.prizeAt?.description.isEmpty == nil, errorSet[safe: index] != nil {
errorSet[index].insert(.date)
}

return InputPrizeInfoObject(
name: prize.name,
prize: prize.prize,
prizeAt: prize.prizeAt
prizeAt: prize.prizeAt ?? Date()
)
}
model?.updateErrorSetList(set: errorSet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension InputPrizeInfoModel: InputPrizeInfoActionProtocol {
let newPrize = PrizeInfo(
name: "",
prize: "",
prizeAt: Date()
prizeAt: nil
)
self.prizeList.append(newPrize)
self.collapsedPrize.append(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import DateUtil
struct PrizeInfo: Equatable {
var name: String
var prize: String
var prizeAt: Date
var prizeAt: Date?

var prizeAtString: String {
prizeAt.toStringCustomFormat(format: "yyyy.MM")
prizeAt?.toStringCustomFormat(format: "yyyy.MM") ?? ""
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ struct ImageMethodPickerView: View {
var body: some View {
VStack(spacing: 28) {
Group {
ImageMethodRowView(title: "앨범에서 가져오기", icon: .photo) {
ImageMethodRowView(title: "앨범", icon: .photo) {
albumAction()
}

ImageMethodRowView(title: "카메라에서 촬영하기", icon: .camera) {
ImageMethodRowView(title: "카메라", icon: .camera) {
cameraAction()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct ImageMethodRowView: View {
action()
} label: {
Label {
SMSText(title, font: .body1)
SMSText(title, font: .title2)
} icon: {
SMSIcon(icon)
}
Expand Down

0 comments on commit b37f616

Please sign in to comment.