Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into Application/499_ed…
Browse files Browse the repository at this point in the history
…it-mypage
  • Loading branch information
juyeong525 committed May 29, 2023
2 parents 7592a58 + 9c2da2b commit f084e0a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
1 change: 0 additions & 1 deletion Application/Sources/Scene/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ struct HomeView: View, XNavigationAndTabContent {
viewModel.fetchMovedClass()
})
.onAppear {
viewModel.viewAppear()
viewModel.fetchTodaysMeal()
viewModel.fetchUserPoint()
viewModel.fetchOutingPass()
Expand Down
4 changes: 0 additions & 4 deletions Application/Sources/Scene/Home/HomeViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,4 @@ class HomeViewModel: ObservableObject {
})
.disposed(by: disposeBag)
}
func viewAppear() {
self.isShowMovedClass = false
self.isShowOutingView = false
}
}
22 changes: 15 additions & 7 deletions Application/Sources/Scene/OutingPass/OutingPassView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,25 @@ struct OutingPassView: View {
.frame(height: 20)
.padding(.bottom, 30)
HStack(alignment: .center) {
AsyncImage(url: URL(string: viewModel.outingPassData?.profileFileName ?? "DefaultImage")) { image in
image
.resizable()
.scaledToFill()
} placeholder: {
if let imageURL = viewModel.outingPassData?.profileFileName {
AsyncImage(url: URL(string: imageURL)) { image in
image
.resizable()
.scaledToFill()
} placeholder: {
Image("DefaultImage")
.resizable()
.scaledToFill()
}
.frame(width: 60, height: 60)
.cornerRadius(30)
} else {
Image("DefaultImage")
.resizable()
.scaledToFill()
.frame(width: 60, height: 60)
.cornerRadius(30)
}
.frame(width: 60, height: 60)
.cornerRadius(30)
Spacer().frame(width: 16)
Text("\(viewModel.outingPassData?.studentNumber ?? "") \(viewModel.outingPassData?.studentName ?? "")")
.sdText(type: .heading5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct OutingPassResponse: Decodable {

}

let profileFileName: String
let profileFileName: String?
let studentNumber: String
let studentName: String
let startTime: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

public struct OutingPassEntity: Equatable {
public let profileFileName: String
public let profileFileName: String?
public let studentNumber: String
public let studentName: String
public let startTime: Date
Expand All @@ -11,7 +11,7 @@ public struct OutingPassEntity: Equatable {
public let picnicDate: Date

public init(
profileFileName: String,
profileFileName: String?,
studentNumber: String,
studentName: String,
startTime: Date,
Expand Down

0 comments on commit f084e0a

Please sign in to comment.