@@ -21,40 +21,48 @@ struct PhotoImportView: View {
2121 header
2222 . padding ( . top, 40 )
2323
24- if store. isFetchingPhotos && store. photos. isEmpty {
25- Spacer ( )
26- ProgressView ( )
27- Spacer ( )
28- } else if store. photos. isEmpty {
29- Spacer ( )
30- ArchiveEmptyView ( description: " 아직 등록된 사진이 없어요 " )
31- Spacer ( )
32- } else {
33- ScrollView {
34- VStack ( spacing: 0 ) {
35- LazyVGrid ( columns: columns, spacing: 2 ) {
36- ForEach ( store. photos) { item in
37- imageCell ( for: item)
38- . onAppear {
39- if item == store. photos. last {
40- store. send ( . loadMorePhotos)
24+ ZStack {
25+ if store. isFetchingPhotos && store. photos. isEmpty {
26+ VStack {
27+ Spacer ( )
28+ ProgressView ( )
29+ Spacer ( )
30+ }
31+ } else if store. photos. isEmpty {
32+ VStack {
33+ Spacer ( )
34+ ArchiveEmptyView ( description: " 아직 등록된 사진이 없어요 " )
35+ Spacer ( )
36+ }
37+ } else {
38+ ScrollView {
39+ VStack ( spacing: 0 ) {
40+ LazyVGrid ( columns: columns, spacing: 2 ) {
41+ ForEach ( store. photos) { item in
42+ imageCell ( for: item)
43+ . onAppear {
44+ if item == store. photos. last {
45+ store. send ( . loadMorePhotos)
46+ }
4147 }
42- }
48+ }
49+ }
50+ . padding ( . vertical, 12 )
51+ . padding ( . horizontal, 20 )
52+
53+ if store. isFetchingPhotos && !store. photos. isEmpty {
54+ ProgressView ( )
55+ . padding ( . vertical, 20 )
56+ . padding ( . bottom, 120 )
57+ } else {
58+ Spacer ( ) . frame ( height: 120 )
4359 }
44- }
45- . padding ( . vertical, 12 )
46- . padding ( . horizontal, 20 )
47-
48- if store. isFetchingPhotos && !store. photos. isEmpty {
49- ProgressView ( )
50- . padding ( . vertical, 20 )
51- . padding ( . bottom, 120 )
52- } else {
53- Spacer ( ) . frame ( height: 120 )
5460 }
5561 }
5662 }
5763 }
64+ . animation ( . easeInOut( duration: 0.3 ) , value: store. isFetchingPhotos)
65+ . animation ( . easeInOut( duration: 0.3 ) , value: store. photos)
5866 }
5967
6068 VStack ( spacing: 0 ) {
0 commit comments