diff --git a/PLAT/PLAT/Domain/UseCase/AuthUseCase.swift b/PLAT/PLAT/Domain/UseCase/AuthUseCase.swift index 8336d6c9..08d39c2e 100644 --- a/PLAT/PLAT/Domain/UseCase/AuthUseCase.swift +++ b/PLAT/PLAT/Domain/UseCase/AuthUseCase.swift @@ -107,11 +107,8 @@ extension AuthUseCase { Task { let result = await memberService.fetchProfile() switch result { - case .success(let user): - state.user = user - - case .failure(let error): - print(error) // TODO: 에러 처리 + case .success(let user): state.user = user + case .failure(let error): print(error) } } diff --git a/PLAT/PLAT/Domain/UseCase/TrackUseCase.swift b/PLAT/PLAT/Domain/UseCase/TrackUseCase.swift index 11dc334c..c1bb1c82 100644 --- a/PLAT/PLAT/Domain/UseCase/TrackUseCase.swift +++ b/PLAT/PLAT/Domain/UseCase/TrackUseCase.swift @@ -166,7 +166,7 @@ extension TrackUseCase { let result = await trackService.fetchCurrent(trackId: id) switch result { case .success(let track): self.currentTrack = track - case .failure(let error): print(error) // TODO: 에러 처리 + case .failure(let error): print(error) } } @@ -180,7 +180,7 @@ extension TrackUseCase { ) switch uploadTrackResult { case .success: break - case .failure(let error): print(error) // TODO: 에러 처리 + case .failure(let error): print(error) } } @@ -189,7 +189,7 @@ extension TrackUseCase { let result = await trackService.report(trackId: trackId) switch result { case .success: break - case .failure(let error): print(error) // TODO: 에러 처리 + case .failure(let error): print(error) } } } diff --git a/PLAT/PLAT/Presentaion/TrackFeed/TrackFeedView.swift b/PLAT/PLAT/Presentaion/TrackFeed/TrackFeedView.swift index 8d35354b..ff6e3fe9 100644 --- a/PLAT/PLAT/Presentaion/TrackFeed/TrackFeedView.swift +++ b/PLAT/PLAT/Presentaion/TrackFeed/TrackFeedView.swift @@ -104,8 +104,7 @@ private struct FeedList: View { ScrollView { LazyVStack { ForEach(Array(trackList.enumerated()), id: \.offset) { index, track in - FeedRowView( - currentTrack: $musicControlUseCase.state.currentTrack, + FeedRow( isLoading: $isLoading, isNonePlaylistToastPresented: $isNonePlaylistToastPresented, track: track, @@ -156,24 +155,18 @@ private struct FeedList: View { } } -// MARK: - FeedRowView +// MARK: - FeedRow -private struct FeedRowView: View { +private struct FeedRow: View { @Environment(MusicControlUseCase.self) private var musicControlUseCase - @Environment(UserUseCase.self) private var userUseCase @Environment(AuthUseCase.self) private var authUseCase - @Environment(TrackUseCase.self) private var trackUseCase - @Environment(PathModel.self) private var pathModel - @State private var isPaused = true - - @Binding private(set) var currentTrack: Track? @Binding private(set) var isLoading: Bool @Binding private(set) var isNonePlaylistToastPresented: Bool let track: Track - let address: String? + let address: String var body: some View { VStack(spacing: 0) { @@ -185,7 +178,7 @@ private struct FeedRowView: View { HStack(spacing: 0) { VStack(alignment: . leading, spacing: 2) { FeedHeaderView(track: track) - FeedLocationView(address: address ?? "", track: track) + FeedLocationView(address: address, track: track) } Spacer() @@ -223,10 +216,8 @@ private struct FeedRowView: View { Rectangle() .foregroundColor(.gray9) - .frame(width: UIScreen.main.bounds.width, height: 1) - } - .onAppear { - authUseCase.effect(.fetchProfile) + .frame(maxWidth: .infinity) + .frame(height: 1) } } } diff --git a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Contents.json b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Contents.json index bd20ad9e..8796ebdd 100644 --- a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Contents.json +++ b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Contents.json @@ -1,17 +1,8 @@ { "images" : [ { - "filename" : "img_feedloacation.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" + "filename" : "Pin.svg", + "idiom" : "universal" } ], "info" : { diff --git a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Pin.svg b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Pin.svg new file mode 100644 index 00000000..2b4995c5 --- /dev/null +++ b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/Pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/img_feedloacation.png b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/img_feedloacation.png deleted file mode 100644 index 54793dca..00000000 Binary files a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_feedloacation.imageset/img_feedloacation.png and /dev/null differ diff --git a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Contents.json b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Contents.json index 09d1580d..8796ebdd 100644 --- a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Contents.json +++ b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "Mask group.png", + "filename" : "Pin.svg", "idiom" : "universal" } ], diff --git a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Mask group.png b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Mask group.png deleted file mode 100644 index 11e84319..00000000 Binary files a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Mask group.png and /dev/null differ diff --git a/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Pin.svg b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Pin.svg new file mode 100644 index 00000000..2b4995c5 --- /dev/null +++ b/PLAT/PLAT/Resource/Assets/Assets.xcassets/img_marker.imageset/Pin.svg @@ -0,0 +1,3 @@ + + +