Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Solply/Solply/Global/Enum/CustomLoadingType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ enum CustomLoadingType {
case placeDetailLoading
case courseDetailLoading
case archiveFolderLoading
case recordListLoading
}
51 changes: 51 additions & 0 deletions Solply/Solply/Global/Modifier/CustomLoadingModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,57 @@ extension View {
}
)
)

// MARK: - RecordListLoading

case .recordListLoading:
self.modifier(
CustomLoadingModifier(
isLoading: isLoading,
loadingView: {
VStack(alignment: .center, spacing: 0) {
ForEach(0..<2) { index in
VStack(alignment: .leading, spacing : 16.adjustedHeight) {
HStack(alignment: .center, spacing: 8.adjustedWidth) {
SolplySkeletonView(width: 24.adjusted, height: 24.adjusted, cornerRadius: 0)
.capsuleClipped()

SolplySkeletonView(font: .body_14_m, width: 60.adjustedWidth)
}

HStack(alignment: .center, spacing: 8.adjustedWidth) {
ForEach(0..<4) { _ in
SolplySkeletonView(width: 72.adjusted, height: 72.adjusted, cornerRadius: 12)
}
}

VStack(alignment: .leading, spacing: 2.adjustedHeight) {
SolplySkeletonView(font: .body_14_r, width: 343.adjustedWidth, cornerRadius: 4)
SolplySkeletonView(font: .body_14_r, width: 343.adjustedWidth)
}

SolplySkeletonView(font: .body_14_m, width: 127.adjustedWidth, cornerRadius: 4)
}
.padding(.vertical, 20.adjustedHeight)
.overlay(alignment: .bottom) {
if index == 0 {
Rectangle()
.frame(height: 1)
.foregroundStyle(.gray200)
}
}
.padding(.horizontal, 20.adjustedWidth)
}
}
}
)
)
}
}
}

#Preview {
Text("")
.customLoading(.recordListLoading, isLoading: true)
Spacer()
}
Comment on lines +431 to +435
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프리뷰 지우기로 햇는데ㅡ..ㅡ

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
struct PlaceRecordWriteRequestDTO: RequestModelType {
let placeId: Int
let visitedAt: String
let visitTimeSlot: VisitTime
let visitTimeSlot: String
let content: String
let imageKeys: [String]
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ struct AIRecommendPromptView: View {
appCoordinator.goBack()
})
.customModal()
.onTapGesture {
hideKeyboard()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct RecordListView: View {
}

recordList
.customLoading(.recordListLoading, isLoading: store.state.isLoading)

bottomPadding
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class RecordWriteStore: ObservableObject {
let request = PlaceRecordWriteRequestDTO(
placeId: placeId,
visitedAt: vistedAt,
visitTimeSlot: visitTimeSlot,
visitTimeSlot: visitTimeSlot.rawValue,
content: state.recordText,
imageKeys: imageKeyStrings
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ struct RecordWriteView: View {
}
.padding(.bottom, 124.adjustedHeight)
}
.onTapGesture {
hideKeyboard()
}
.overlay(alignment: .bottom) {
registerRecordButton
.padding(.bottom, 4.adjustedHeight)
Expand Down