diff --git a/feature/received/src/main/java/com/susu/feature/received/received/ReceivedScreen.kt b/feature/received/src/main/java/com/susu/feature/received/received/ReceivedScreen.kt index 1a627a29..81cc293a 100644 --- a/feature/received/src/main/java/com/susu/feature/received/received/ReceivedScreen.kt +++ b/feature/received/src/main/java/com/susu/feature/received/received/ReceivedScreen.kt @@ -57,7 +57,6 @@ import com.susu.feature.received.R import com.susu.feature.received.navigation.argument.FilterArgument import com.susu.feature.received.received.component.LedgerAddCard import com.susu.feature.received.received.component.LedgerCard -import com.susu.feature.received.received.component.LedgerCategoryCard import kotlinx.collections.immutable.toPersistentList import kotlinx.coroutines.android.awaitFrame import kotlinx.coroutines.launch @@ -236,49 +235,24 @@ fun ReceiveScreen( verticalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs), horizontalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs), ) { - if (uiState.isFiltered) { - uiState.ledgerList.groupBy { it.category }.forEach { (category, ledgerList) -> - item( - span = { GridItemSpan(2) }, - contentType = "LedgerCategoryCard", - ) { - LedgerCategoryCard(name = category.name) - } - - items( - items = ledgerList, - key = { it.id }, - ) { ledger -> - LedgerCard( - ledgerType = ledger.category.name, - title = ledger.title, - money = ledger.totalAmounts, - count = ledger.totalCounts, - style = ledger.category.style, - onClick = { onClickLedgerCard(ledger) }, - ) - } - } - } else { - items( - items = uiState.ledgerList, - key = { it.id }, - ) { ledger -> - LedgerCard( - ledgerType = ledger.category.name, - title = ledger.title, - money = ledger.totalAmounts, - count = ledger.totalCounts, - style = ledger.category.style, - onClick = { onClickLedgerCard(ledger) }, - ) - } + items( + items = uiState.ledgerList, + key = { it.id }, + ) { ledger -> + LedgerCard( + ledgerType = ledger.category.name, + title = ledger.title, + money = ledger.totalAmounts, + count = ledger.totalCounts, + style = ledger.category.style, + onClick = { onClickLedgerCard(ledger) }, + ) + } - item { - LedgerAddCard( - onClick = onClickLedgerAddCard, - ) - } + item { + LedgerAddCard( + onClick = onClickLedgerAddCard, + ) } } } diff --git a/feature/received/src/main/java/com/susu/feature/received/received/component/LedgerCategoryCard.kt b/feature/received/src/main/java/com/susu/feature/received/received/component/LedgerCategoryCard.kt deleted file mode 100644 index 268248ab..00000000 --- a/feature/received/src/main/java/com/susu/feature/received/received/component/LedgerCategoryCard.kt +++ /dev/null @@ -1,69 +0,0 @@ -package com.susu.feature.received.received.component - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material3.HorizontalDivider -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import com.susu.core.designsystem.theme.Gray40 -import com.susu.core.designsystem.theme.SusuTheme -import com.susu.feature.received.R - -@Composable -fun LedgerCategoryCard( - name: String, -) { - Row( - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs), - ) { - HorizontalDivider( - modifier = Modifier.weight(1f), - color = Gray40, - ) - - Text( - text = stringResource(R.string.ledger_category_card_event_category), - style = SusuTheme.typography.title_xxxs, - color = Gray40, - ) - - Box( - modifier = Modifier - .clip(CircleShape) - .size(4.dp) - .background(Gray40), - ) - - Text( - text = name, - style = SusuTheme.typography.title_xxxs, - color = Gray40, - ) - - HorizontalDivider( - modifier = Modifier.weight(1f), - color = Gray40, - ) - } -} - -@Preview(showBackground = true) -@Composable -fun LedgerCategoryCardPreview() { - SusuTheme { - LedgerCategoryCard( - name = "결혼식", - ) - } -}