@@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
1616import androidx.compose.ui.Alignment
1717import androidx.compose.ui.Modifier
1818import androidx.compose.ui.res.stringResource
19+ import androidx.compose.ui.text.style.TextAlign
1920import androidx.compose.ui.unit.coerceAtLeast
2021import androidx.compose.ui.unit.dp
2122import com.flipcash.app.core.data.Loadable
@@ -74,8 +75,14 @@ internal fun TokenLeaderboard(
7475 text = stringResource(R .string.title_discoverFailedToLoad),
7576 style = CodeTheme .typography.textLarge,
7677 color = CodeTheme .colors.textMain,
78+ textAlign = TextAlign .Center ,
79+ )
80+ Text (
81+ text = tokens.message.orEmpty(),
82+ style = CodeTheme .typography.textSmall,
83+ color = CodeTheme .colors.textSecondary,
84+ textAlign = TextAlign .Center ,
7785 )
78- Text (text = tokens.message.orEmpty())
7986
8087 CodeButton (
8188 onClick = {
@@ -104,16 +111,23 @@ internal fun TokenLeaderboard(
104111 ) {
105112 Column (horizontalAlignment = Alignment .CenterHorizontally ) {
106113 Text (
107- text = stringResource(R .string.title_discoverEmpty),
114+ text = when (category) {
115+ DiscoverCategory .Popular -> stringResource(R .string.title_discoverEmptyPopular)
116+ DiscoverCategory .New -> stringResource(R .string.title_discoverEmptyNew)
117+ else -> " "
118+ },
108119 style = CodeTheme .typography.textLarge,
109120 color = CodeTheme .colors.textMain,
121+ textAlign = TextAlign .Center ,
110122 )
111123 Text (
124+ modifier = Modifier .fillMaxWidth(0.6f ),
112125 text = when (category) {
113126 DiscoverCategory .Popular -> stringResource(R .string.subtitle_discoverEmptyPopular)
114127 DiscoverCategory .New -> stringResource(R .string.subtitle_discoverEmptyNew)
115128 else -> " "
116129 },
130+ textAlign = TextAlign .Center ,
117131 style = CodeTheme .typography.textSmall,
118132 color = CodeTheme .colors.textSecondary,
119133 )
0 commit comments