Skip to content

Commit

Permalink
feature #866: feat FortuneAmuletRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
chattymin committed Sep 23, 2024
1 parent 6afb195 commit d524557
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
Expand All @@ -28,15 +28,18 @@ data object FortuneAmulet
@Composable
internal fun FortuneAmuletRoute(
paddingValue: PaddingValues,
navigateToHome: () -> Unit
) {
FortuneAmuletScreen(
paddingValue = paddingValue,
navigateToHome = navigateToHome
)
}

@Composable
private fun FortuneAmuletScreen(
paddingValue: PaddingValues,
navigateToHome: () -> Unit
) {
Column(
modifier = Modifier
Expand Down Expand Up @@ -73,7 +76,7 @@ private fun FortuneAmuletScreen(
contentDescription = null,
modifier = Modifier
.padding(horizontal = 33.dp)
.fillMaxWidth()
.fillMaxHeight(0.55f)
)

Spacer(modifier = Modifier.weight(1f))
Expand All @@ -86,10 +89,9 @@ private fun FortuneAmuletScreen(
color = SoptTheme.colors.onBackground,
modifier = Modifier.padding(horizontal = 20.dp, vertical = 12.dp)
)
}
) {
// TODO: Navigate to Home
}
},
onClick = navigateToHome
)

Spacer(modifier = Modifier.height(50.dp))
}
Expand All @@ -101,6 +103,7 @@ fun PreviewFortuneAmuletScreen() {
SoptTheme {
FortuneAmuletScreen(
paddingValue = PaddingValues(16.dp),
navigateToHome = {}
)
}
}

0 comments on commit d524557

Please sign in to comment.