@@ -47,6 +47,7 @@ import com.getcode.ui.theme.ButtonState
4747import com.getcode.ui.theme.CodeButton
4848import com.getcode.ui.theme.CodeCircularProgressIndicator
4949import com.getcode.ui.theme.CodeScaffold
50+ import com.getcode.util.format
5051
5152@Composable
5253internal fun TokenInfoScreen (viewModel : TokenInfoViewModel ) {
@@ -170,7 +171,7 @@ private fun TokenBalance(
170171 Column (
171172 modifier = modifier
172173 .padding(horizontal = CodeTheme .dimens.inset)
173- .padding(vertical = CodeTheme .dimens.grid.x9, ),
174+ .padding(vertical = CodeTheme .dimens.grid.x9),
174175 ) {
175176 if (balance == null ) {
176177 Box (modifier = Modifier .fillMaxWidth(), contentAlignment = Alignment .Center ) {
@@ -254,10 +255,32 @@ private fun CurrencyInfoSection(
254255 )
255256 }
256257
258+ state.token?.createdAt?.let { mintDate ->
259+ Text (
260+ modifier = Modifier
261+ .padding(horizontal = CodeTheme .dimens.inset)
262+ .padding(top = CodeTheme .dimens.grid.x1),
263+ text = stringResource(
264+ R .string.label_mintDate,
265+ mintDate.format(" MMMM dd, yyyy" )
266+ ),
267+ style = CodeTheme .typography.textMedium,
268+ color = CodeTheme .colors.textSecondary,
269+ )
270+ }
271+
257272 ExpandableText (
258- modifier = Modifier .padding(top = CodeTheme .dimens.grid.x1),
273+ modifier = Modifier
274+ .padding(
275+ top = if (state.token?.createdAt == null ) {
276+ CodeTheme .dimens.grid.x1
277+ } else {
278+ CodeTheme .dimens.grid.x2
279+ }
280+ ),
259281 text = state.token?.description.orEmpty(),
260282 style = CodeTheme .typography.textMedium,
283+ color = CodeTheme .colors.textSecondary,
261284 isExpanded = state.descriptionExpanded,
262285 isExpandable = false ,
263286 contentPadding = PaddingValues (horizontal = CodeTheme .dimens.inset)
@@ -311,6 +334,7 @@ private fun PreviewTokenInfo() {
311334 text = LoremIpsum (words = 400 ).values.joinToString(" " ),
312335 contentPadding = PaddingValues (horizontal = 16 .dp),
313336 style = CodeTheme .typography.textMedium,
337+ color = CodeTheme .colors.textSecondary,
314338 isExpanded = false ,
315339 isExpandable = false ,
316340 onToggle = { }
0 commit comments