Skip to content

Commit e0f650a

Browse files
committed
chore(transactions): add empty state for history
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent 2e3645e commit e0f650a

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

apps/flipcash/core/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,4 +423,7 @@
423423
<string name="subtitle_marketCap">Market Cap</string>
424424
<string name="subtitle_currencyInfo">Currency Info</string>
425425
<string name="title_shareToken">Check out %1$s on Flipcash</string>
426+
427+
<string name="title_noTransactionHistory">No Activity</string>
428+
<string name="description_noTransactionHistory">Your recent activity will appear here when you send or receive money</string>
426429
</resources>

apps/flipcash/features/transactions/src/main/kotlin/com/flipcash/app/transactions/internal/TransactionHistoryScreen.kt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.flipcash.app.transactions.internal
22

3+
import androidx.compose.foundation.layout.Arrangement
34
import androidx.compose.foundation.layout.Box
5+
import androidx.compose.foundation.layout.Column
46
import androidx.compose.foundation.layout.Spacer
57
import androidx.compose.foundation.layout.WindowInsets
68
import androidx.compose.foundation.layout.fillMaxSize
@@ -10,17 +12,20 @@ import androidx.compose.foundation.layout.windowInsetsPadding
1012
import androidx.compose.foundation.lazy.LazyColumn
1113
import androidx.compose.foundation.lazy.rememberLazyListState
1214
import androidx.compose.material.Divider
15+
import androidx.compose.material.Text
1316
import androidx.compose.runtime.Composable
1417
import androidx.compose.runtime.getValue
1518
import androidx.compose.ui.Alignment
1619
import androidx.compose.ui.Modifier
20+
import androidx.compose.ui.res.stringResource
1721
import androidx.lifecycle.compose.collectAsStateWithLifecycle
1822
import androidx.paging.LoadState
1923
import androidx.paging.compose.LazyPagingItems
2024
import androidx.paging.compose.collectAsLazyPagingItems
2125
import androidx.paging.compose.itemKey
2226
import com.flipcash.app.core.feed.ActivityFeedMessage
2327
import com.flipcash.app.transactions.internal.components.FeedItem
28+
import com.flipcash.features.transactions.R
2429
import com.getcode.theme.CodeTheme
2530
import com.getcode.ui.core.verticalScrollStateGradient
2631

@@ -69,7 +74,22 @@ private fun FeedList(
6974
modifier = Modifier.fillParentMaxSize().padding(bottom = CodeTheme.dimens.inset),
7075
contentAlignment = Alignment.Center
7176
) {
72-
77+
Column(
78+
modifier = Modifier.fillParentMaxWidth(),
79+
verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x4),
80+
horizontalAlignment = Alignment.CenterHorizontally,
81+
) {
82+
Text(
83+
text = stringResource(R.string.title_noTransactionHistory),
84+
style = CodeTheme.typography.textLarge,
85+
color = CodeTheme.colors.textMain,
86+
)
87+
Text(
88+
text = stringResource(R.string.description_noTransactionHistory),
89+
style = CodeTheme.typography.textSmall,
90+
color = CodeTheme.colors.textSecondary,
91+
)
92+
}
7393
}
7494
}
7595
} else {

0 commit comments

Comments
 (0)