fix(character-detail) 캐릭터 상세
- 화면이 좌우로 길어지면서 잘리던 버그 수정
This commit is contained in:
		@@ -6,6 +6,7 @@
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
import SwiftUI
 | 
			
		||||
import Kingfisher
 | 
			
		||||
 | 
			
		||||
struct CharacterDetailView: View {
 | 
			
		||||
    
 | 
			
		||||
@@ -167,17 +168,11 @@ extension CharacterDetailView {
 | 
			
		||||
extension CharacterDetailView {
 | 
			
		||||
    private var characterImageSection: some View {
 | 
			
		||||
        // 배경 이미지
 | 
			
		||||
        AsyncImage(url: URL(string: viewModel.characterDetail?.imageUrl ?? "https://picsum.photos/400")) { image in
 | 
			
		||||
            image
 | 
			
		||||
                .resizable()
 | 
			
		||||
                .aspectRatio(contentMode: .fill)
 | 
			
		||||
        } placeholder: {
 | 
			
		||||
            Rectangle()
 | 
			
		||||
                .fill(Color.gray)
 | 
			
		||||
        }
 | 
			
		||||
        .frame(maxWidth: .infinity)
 | 
			
		||||
        .frame(height: screenSize().width)
 | 
			
		||||
        .clipped()
 | 
			
		||||
        KFImage(URL(string: viewModel.characterDetail?.imageUrl ?? "https://picsum.photos/400"))
 | 
			
		||||
            .resizable()
 | 
			
		||||
            .scaledToFill()
 | 
			
		||||
            .frame(width: screenSize().width, height: screenSize().width, alignment: .top)
 | 
			
		||||
            .clipped()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -190,6 +185,8 @@ extension CharacterDetailView {
 | 
			
		||||
                Text(viewModel.characterDetail?.name ?? "")
 | 
			
		||||
                    .font(.custom(Font.preBold.rawValue, size: 26))
 | 
			
		||||
                    .foregroundColor(.white)
 | 
			
		||||
                    .lineLimit(1)
 | 
			
		||||
                    .truncationMode(.tail)
 | 
			
		||||
                
 | 
			
		||||
                if let characterType = viewModel.characterDetail?.characterType {
 | 
			
		||||
                    HStack(spacing: 8) {
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,8 @@ struct DetailNavigationBar: View {
 | 
			
		||||
                Text(title)
 | 
			
		||||
                    .font(.custom(Font.preBold.rawValue, size: 18.3))
 | 
			
		||||
                    .foregroundColor(.grayee)
 | 
			
		||||
                    .lineLimit(1)
 | 
			
		||||
                    .truncationMode(.tail)
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            Spacer()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user