Skip to content

Commit 53706b3

Browse files
committed
[feat] #173 편집하기 뷰 구성
1 parent 1c7cb18 commit 53706b3

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

Projects/Feature/FeaturePokit/Sources/PokitLinkEditView.swift

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
//
55
// Created by 김민호 on 12/24/24.
66

7-
import ComposableArchitecture
87
import SwiftUI
98

9+
import ComposableArchitecture
10+
import DSKit
11+
import Domain
12+
import CoreKit
13+
1014
@ViewAction(for: PokitLinkEditFeature.self)
1115
public struct PokitLinkEditView: View {
1216
/// - Properties
@@ -21,21 +25,57 @@ public struct PokitLinkEditView: View {
2125
public extension PokitLinkEditView {
2226
var body: some View {
2327
WithPerceptionTracking {
24-
VStack {
25-
Text("Hello World!")
28+
VStack(spacing: 0) {
29+
ScrollView {
30+
ForEach(store.list, id: \.id) { item in
31+
let isFirst = item.id == self.store.list.first?.id
32+
let isLast = item.id == self.store.list.last?.id
33+
PokitLinkCard(
34+
link: item,
35+
state: isFirst
36+
? .top
37+
: isLast ? .bottom : .middle,
38+
type: .unCatgorized(isSelected: store.selectedItems.contains(item)),
39+
action: nil,
40+
kebabAction: nil,
41+
fetchMetaData: {},
42+
favoriteAction: nil,
43+
selectAction: { send(.체크박스_선택했을때(item)) }
44+
)
45+
}
46+
}
47+
}
48+
.padding(.horizontal, 20)
49+
.padding(.top, 16)
50+
.pokitNavigationBar(navigationBar)
51+
.overlay(alignment: .bottom) {
52+
actionFloatButtonView
2653
}
2754
}
2855
}
2956
}
3057
//MARK: - Configure View
3158
private extension PokitLinkEditView {
59+
var navigationBar: some View {
60+
PokitHeader(title: "링크 분류하기") {
61+
PokitHeaderItems(placement: .leading) {
62+
PokitToolbarButton(.icon(.x)) {
63+
// send(.뒤로가기_버튼_눌렀을때)
64+
}
65+
}
66+
}
67+
.padding(.top, 8)
68+
}
3269

70+
var actionFloatButtonView: some View {
71+
EmptyView()
72+
}
3373
}
3474
//MARK: - Preview
3575
#Preview {
3676
PokitLinkEditView(
3777
store: Store(
38-
initialState: .init(),
78+
initialState: .init(linkList: BaseContentListInquiry(data: nil, page: 0, size: 0, sort: [], hasNext: false)),
3979
reducer: { PokitLinkEditFeature() }
4080
)
4181
)

0 commit comments

Comments
 (0)