Skip to content

Commit

Permalink
[#73] 끌어올리기 구현완
Browse files Browse the repository at this point in the history
  • Loading branch information
00yhsp committed Feb 18, 2024
1 parent c7b1756 commit 6d65e5f
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 145 deletions.
3 changes: 2 additions & 1 deletion Spon-us/Helper/AsyncImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ struct AsyncImageView: View {
Image(uiImage: image)
.resizable()
} else {
ProgressView()
Image(.profileTest)
.resizable()
}
}
.onAppear {
Expand Down
4 changes: 4 additions & 0 deletions Spon-us/Model/Portfolio/MyAnnouncementsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class MyAnnouncementsViewModel: ObservableObject {
let myAnnouncements = try JSONDecoder().decode(MyAnnouncementsModel.self, from: response.data)
DispatchQueue.main.async {
self.myAnnouncementsContents = myAnnouncements.content
self.myAnnouncementsContents.sort {$0.updatedAt > $1.updatedAt}
self.isLoading = false
print(self.myAnnouncementsContents)
}
Expand All @@ -100,11 +101,14 @@ class MyAnnouncementsViewModel: ObservableObject {
do {
let responseBody = try response.map(LogoutModel400.self)
print("pullup responseBody : \(responseBody)")
completion(true)
} catch {
print("pullup json parsing error")
completion(false)
}
case .failure(let error):
print("pullup failure error")
completion(false)
}
}
}
Expand Down
Loading

0 comments on commit 6d65e5f

Please sign in to comment.