Skip to content

Commit b3c2d21

Browse files
committed
fix(tokens/discovery): ensure we aren't left with negative padding when showing create
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 082699f commit b3c2d21

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • apps/flipcash/features/discovery/src/main/kotlin/com/flipcash/app/discovery/internal/components

apps/flipcash/features/discovery/src/main/kotlin/com/flipcash/app/discovery/internal/components/TokenLeaderboard.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
1616
import androidx.compose.ui.Alignment
1717
import androidx.compose.ui.Modifier
1818
import androidx.compose.ui.res.stringResource
19+
import androidx.compose.ui.unit.coerceAtLeast
1920
import androidx.compose.ui.unit.dp
2021
import com.flipcash.app.core.data.Loadable
2122
import com.flipcash.app.core.data.isLoaded
@@ -58,7 +59,7 @@ internal fun TokenLeaderboard(
5859
start = CodeTheme.dimens.inset,
5960
end = CodeTheme.dimens.inset,
6061
top = CodeTheme.dimens.grid.x2 + padding.calculateTopPadding(),
61-
bottom = CodeTheme.dimens.grid.x2 + padding.calculateBottomPadding() - reduceBottomPadding,
62+
bottom = (CodeTheme.dimens.grid.x2 + padding.calculateBottomPadding() - reduceBottomPadding).coerceAtLeast(0.dp)
6263
)
6364
) {
6465
when (tokens) {

0 commit comments

Comments
 (0)