refactor(navigation): 전역 경로 기반 단일 내비게이션 흐름으로 전환한다
This commit is contained in:
@@ -96,26 +96,23 @@ struct SearchCreatorItemView: View {
|
||||
let item: SearchResponseItem
|
||||
|
||||
var body: some View {
|
||||
NavigationLink {
|
||||
UserProfileView(userId: item.id)
|
||||
} label: {
|
||||
HStack(spacing: 13.3) {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 60, height: 60))
|
||||
.resizable()
|
||||
.frame(width: 60, height: 60)
|
||||
.clipShape(Circle())
|
||||
|
||||
Text(item.nickname)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.contentShape(Rectangle())
|
||||
HStack(spacing: 13.3) {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 60, height: 60))
|
||||
.resizable()
|
||||
.frame(width: 60, height: 60)
|
||||
.clipShape(Circle())
|
||||
|
||||
Text(item.nickname)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture { AppState.shared.setAppStep(step: .creatorDetail(userId: item.id)) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,34 +120,31 @@ struct SearchContentItemView: View {
|
||||
let item: SearchResponseItem
|
||||
|
||||
var body: some View {
|
||||
NavigationLink {
|
||||
ContentDetailView(contentId: item.id)
|
||||
} label: {
|
||||
HStack(spacing: 13.3) {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 60, height: 60))
|
||||
.resizable()
|
||||
.frame(width: 60, height: 60)
|
||||
.cornerRadius(5.3)
|
||||
HStack(spacing: 13.3) {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 60, height: 60))
|
||||
.resizable()
|
||||
.frame(width: 60, height: 60)
|
||||
.cornerRadius(5.3)
|
||||
|
||||
VStack(alignment: .leading, spacing: 6.7) {
|
||||
Text(item.title)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.multilineTextAlignment(.leading)
|
||||
.lineLimit(2)
|
||||
|
||||
VStack(alignment: .leading, spacing: 6.7) {
|
||||
Text(item.title)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.multilineTextAlignment(.leading)
|
||||
.lineLimit(2)
|
||||
|
||||
Text(item.nickname)
|
||||
.appFont(size: 10, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
Text(item.nickname)
|
||||
.appFont(size: 10, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.contentShape(Rectangle())
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture { AppState.shared.setAppStep(step: .contentDetail(contentId: item.id)) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,36 +152,33 @@ struct SearchSeriesItemView: View {
|
||||
let item: SearchResponseItem
|
||||
|
||||
var body: some View {
|
||||
NavigationLink {
|
||||
SeriesDetailView(seriesId: item.id)
|
||||
} label: {
|
||||
HStack(spacing: 13.3) {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 60, height: 85))
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: 60, height: 85)
|
||||
.clipped()
|
||||
.cornerRadius(5.3)
|
||||
HStack(spacing: 13.3) {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 60, height: 85))
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: 60, height: 85)
|
||||
.clipped()
|
||||
.cornerRadius(5.3)
|
||||
|
||||
VStack(alignment: .leading, spacing: 6.7) {
|
||||
Text(item.title)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.multilineTextAlignment(.leading)
|
||||
.lineLimit(2)
|
||||
|
||||
VStack(alignment: .leading, spacing: 6.7) {
|
||||
Text(item.title)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.grayee)
|
||||
.multilineTextAlignment(.leading)
|
||||
.lineLimit(2)
|
||||
|
||||
Text(item.nickname)
|
||||
.appFont(size: 10, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
Text(item.nickname)
|
||||
.appFont(size: 10, weight: .medium)
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.contentShape(Rectangle())
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture { AppState.shared.setAppStep(step: .seriesDetail(seriesId: item.id)) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ struct SearchView: View {
|
||||
]
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
Group {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 0) {
|
||||
|
||||
Reference in New Issue
Block a user