@@ -77,69 +77,78 @@ private fun ReportHistoryScreen(
7777 )
7878 }
7979
80- // chip list
81-
8280 Spacer (modifier = Modifier .width(8 .dp))
8381 }
8482
8583 Spacer (modifier = Modifier .height(24 .dp))
8684
8785 Box (
88- modifier = Modifier .weight(1f ),
86+ modifier = Modifier .fillMaxWidth(). weight(1f ),
8987 ) {
90- LazyColumn (
91- modifier = Modifier .fillMaxSize(),
92- contentPadding = PaddingValues (horizontal = 16 .dp),
93- ) {
94- state.reportHistoriesPerDays.forEach { reportHistoriesPerDay ->
95- stickyHeader {
96- Box (
97- modifier = Modifier
98- .fillMaxWidth()
99- .height(40 .dp)
100- .background(color = BitnagilTheme .colors.coolGray99),
101- ) {
102- Text (
103- text = reportHistoriesPerDay.date.toString(),
104- modifier = Modifier .align(Alignment .CenterStart ),
105- style = BitnagilTheme .typography.body2SemiBold,
106- )
88+ if (state.filteredReportHistoriesPerDays.isNotEmpty())
89+ LazyColumn (
90+ modifier = Modifier .fillMaxSize(),
91+ contentPadding = PaddingValues (horizontal = 16 .dp),
92+ ) {
93+ state.reportHistoriesPerDays.forEach { reportHistoriesPerDay ->
94+ stickyHeader {
95+ Box (
96+ modifier = Modifier
97+ .fillMaxWidth()
98+ .height(40 .dp)
99+ .background(color = BitnagilTheme .colors.coolGray99),
100+ ) {
101+ Text (
102+ text = reportHistoriesPerDay.date.toString(),
103+ modifier = Modifier .align(Alignment .CenterStart ),
104+ style = BitnagilTheme .typography.body2SemiBold,
105+ )
106+ }
107107 }
108- }
109108
110- itemsIndexed(reportHistoriesPerDay.reports) { index, report ->
111- ReportHistoryItem (
112- modifier = Modifier .padding(bottom = if (index == reportHistoriesPerDay.reports.lastIndex) 24 .dp else 10 .dp),
113- report = report,
114- onClick = {},
115- )
109+ itemsIndexed(reportHistoriesPerDay.reports) { index, report ->
110+ ReportHistoryItem (
111+ modifier = Modifier .padding(bottom = if (index == reportHistoriesPerDay.reports.lastIndex) 24 .dp else 10 .dp),
112+ report = report,
113+ onClick = {},
114+ )
115+ }
116116 }
117117 }
118- }
119-
120- Row (
121- verticalAlignment = Alignment .CenterVertically ,
122- horizontalArrangement = Arrangement .spacedBy(5 .dp),
123- modifier = Modifier
124- .height(40 .dp)
125- .align(Alignment .TopEnd )
126- .clickableWithoutRipple { },
127- ) {
128- Text (
129- text = " 카테고리" ,
130- color = BitnagilTheme .colors.coolGray40,
131- style = BitnagilTheme .typography.body2Medium,
132- modifier = Modifier .padding(start = 10 .dp),
133- )
118+ else
119+ Column (
120+ modifier = Modifier .align(Alignment .Center ),
121+ verticalArrangement = Arrangement .spacedBy(2 .dp),
122+ horizontalAlignment = Alignment .CenterHorizontally
123+ ) {
124+ Text (text = " 제보한 내역이 없어요." , style = BitnagilTheme .typography.subtitle1SemiBold)
125+ Text (text = " 원하는 카테고리로 제보를 시작해 보세요." , style = BitnagilTheme .typography.body2Regular, color = BitnagilTheme .colors.coolGray70)
126+ }
134127
135- BitnagilIcon (
136- id = R .drawable.ic_down_arrow,
137- tint = BitnagilTheme .colors.coolGray40,
128+ if (state.showCategorySelectButton)
129+ Row (
130+ verticalAlignment = Alignment .CenterVertically ,
131+ horizontalArrangement = Arrangement .spacedBy(5 .dp),
138132 modifier = Modifier
139- .padding(end = 13 .dp)
140- .size(16 .dp),
141- )
142- }
133+ .height(40 .dp)
134+ .align(Alignment .TopEnd )
135+ .clickableWithoutRipple { },
136+ ) {
137+ Text (
138+ text = state.selectedReportCategory?.title ? : " 카테고리" ,
139+ color = BitnagilTheme .colors.coolGray40,
140+ style = BitnagilTheme .typography.body2Medium,
141+ modifier = Modifier .padding(start = 10 .dp),
142+ )
143+
144+ BitnagilIcon (
145+ id = R .drawable.ic_down_arrow,
146+ tint = BitnagilTheme .colors.coolGray40,
147+ modifier = Modifier
148+ .padding(end = 13 .dp)
149+ .size(16 .dp),
150+ )
151+ }
143152 }
144153 }
145154}
0 commit comments