@@ -24,6 +24,7 @@ import androidx.compose.ui.text.style.TextAlign
2424import androidx.compose.ui.tooling.preview.Preview
2525import androidx.compose.ui.unit.dp
2626import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
27+ import com.yapp.ndgl.core.ui.CommonErrorView
2728import com.yapp.ndgl.core.ui.designsystem.NDGLCTAButton
2829import com.yapp.ndgl.core.ui.designsystem.NDGLCTAButtonAttr
2930import com.yapp.ndgl.core.ui.designsystem.NDGLSearchNavigationBar
@@ -118,7 +119,7 @@ private fun TemplateSearchScreen(
118119 )
119120 }
120121
121- TemplateSearchState .SearchResult .Error -> item { ErrorView () }
122+ TemplateSearchState .SearchResult .Error -> item { CommonErrorView () }
122123 }
123124 }
124125
@@ -208,41 +209,6 @@ private fun EmptyResultView() {
208209 }
209210}
210211
211- @Composable
212- private fun ErrorView () {
213- Column (
214- modifier = Modifier
215- .fillMaxWidth()
216- .padding(horizontal = 24 .dp, vertical = 165 .dp),
217- verticalArrangement = Arrangement .spacedBy(16 .dp),
218- horizontalAlignment = Alignment .CenterHorizontally ,
219- ) {
220- Image (
221- painter = painterResource(CoreR .drawable.img_empty_browser),
222- contentDescription = null ,
223- modifier = Modifier .size(100 .dp),
224- )
225- Column (
226- modifier = Modifier .fillMaxWidth(),
227- verticalArrangement = Arrangement .spacedBy(4 .dp),
228- horizontalAlignment = Alignment .CenterHorizontally ,
229- ) {
230- Text (
231- text = stringResource(R .string.home_template_search_error_title),
232- color = NDGLTheme .colors.black500,
233- textAlign = TextAlign .Center ,
234- style = NDGLTheme .typography.subtitleMdSemiBold,
235- )
236- Text (
237- text = stringResource(R .string.home_template_search_error_description),
238- color = NDGLTheme .colors.black400,
239- textAlign = TextAlign .Center ,
240- style = NDGLTheme .typography.bodyLgRegular,
241- )
242- }
243- }
244- }
245-
246212@Preview(showBackground = true )
247213@Composable
248214private fun InitialEmptyViewPreview () {
@@ -259,14 +225,6 @@ private fun EmptyResultViewPreview() {
259225 }
260226}
261227
262- @Preview(showBackground = true )
263- @Composable
264- private fun ErrorViewPreview () {
265- NDGLTheme {
266- ErrorView ()
267- }
268- }
269-
270228@Preview(showBackground = true )
271229@Composable
272230private fun TemplateSearchScreenFilledPreview () {
0 commit comments