@@ -38,10 +38,10 @@ import to.bitkit.ui.theme.Colors
3838fun ShopDiscoverScreen (
3939 onClose : () -> Unit ,
4040 onBack : () -> Unit ,
41- navigateWebView : (String ) -> Unit ,
41+ navigateWebView : (String , String ) -> Unit , // Page, Title
4242) {
4343 ScreenColumn (
44- modifier = Modifier .gradientBackground()
44+ modifier = Modifier .gradientBackground(),
4545 ) {
4646 AppTopBar (
4747 titleText = stringResource(R .string.other__shop__discover__nav_title),
@@ -50,37 +50,39 @@ fun ShopDiscoverScreen(
5050 )
5151
5252 LazyColumn (
53- modifier = Modifier .padding(horizontal = 16 .dp)
53+ modifier = Modifier .padding(horizontal = 16 .dp),
5454 ) {
5555 item {
5656 VerticalSpacer (16 .dp)
5757
5858 Row (
5959 horizontalArrangement = Arrangement .spacedBy(16 .dp),
6060 ) {
61+ val title = stringResource(R .string.other__shop__discover__gift_cards__title)
6162 SuggestionCard (
6263 modifier = Modifier .weight(1f ),
6364 gradientColor = Colors .Green ,
64- title = stringResource( R .string.other__shop__discover__gift_cards__title) ,
65+ title = title ,
6566 description = stringResource(R .string.other__shop__discover__gift_cards__description),
6667 icon = R .drawable.gift,
6768 captionColor = Colors .Gray1 ,
6869 size = 164 ,
6970 onClick = {
70- navigateWebView(" gift-cards" )
71- }
71+ navigateWebView(" gift-cards" , title )
72+ },
7273 )
74+ val title2 = stringResource(R .string.other__shop__discover__esims__title)
7375 SuggestionCard (
7476 modifier = Modifier .weight(1f ),
7577 gradientColor = Colors .Yellow ,
76- title = stringResource( R .string.other__shop__discover__esims__title) ,
78+ title = title2 ,
7779 description = stringResource(R .string.other__shop__discover__esims__description),
7880 icon = R .drawable.globe,
7981 captionColor = Colors .Gray1 ,
8082 size = 164 ,
8183 onClick = {
82- navigateWebView(" esims" )
83- }
84+ navigateWebView(" esims" , title2 )
85+ },
8486 )
8587 }
8688
@@ -89,29 +91,31 @@ fun ShopDiscoverScreen(
8991 Row (
9092 horizontalArrangement = Arrangement .spacedBy(16 .dp),
9193 ) {
94+ val title = stringResource(R .string.other__shop__discover__refill__title)
9295 SuggestionCard (
9396 modifier = Modifier .weight(1f ),
9497 gradientColor = Colors .Purple ,
95- title = stringResource( R .string.other__shop__discover__refill__title) ,
98+ title = title ,
9699 description = stringResource(R .string.other__shop__discover__refill__description),
97100 icon = R .drawable.phone,
98101 captionColor = Colors .Gray1 ,
99102 size = 164 ,
100103 onClick = {
101- navigateWebView(" refill" )
102- }
104+ navigateWebView(" refill" , title )
105+ },
103106 )
107+ val title2 = stringResource(R .string.other__shop__discover__travel__title)
104108 SuggestionCard (
105109 modifier = Modifier .weight(1f ),
106110 gradientColor = Colors .Red ,
107- title = stringResource( R .string.other__shop__discover__travel__title) ,
111+ title = title2 ,
108112 description = stringResource(R .string.other__shop__discover__travel__description),
109113 icon = R .drawable.rocket_2,
110114 size = 164 ,
111115 captionColor = Colors .Gray1 ,
112116 onClick = {
113- navigateWebView(" buy/travel" )
114- }
117+ navigateWebView(" buy/travel" , title2 )
118+ },
115119 )
116120 }
117121
@@ -128,28 +132,29 @@ fun ShopDiscoverScreen(
128132 modifier = Modifier
129133 .padding(top = 8.5 .dp, bottom = 10.5 .dp)
130134 .clickable {
131- navigateWebView(item.route)
135+ navigateWebView(item.route, item.title )
132136 },
133- verticalAlignment = Alignment .CenterVertically
137+ verticalAlignment = Alignment .CenterVertically ,
134138 ) {
135139 Box (
136140 modifier = Modifier
137141 .clip(CircleShape )
138142 .size(32 .dp)
139143 .background(Colors .White10 ),
140- contentAlignment = Alignment .Center
144+ contentAlignment = Alignment .Center ,
141145 ) {
142146 Icon (
143147 imageVector = item.icon,
144148 contentDescription = null ,
145149 tint = Colors .White64 ,
146- modifier = Modifier .size(16 .dp)
150+ modifier = Modifier .size(16 .dp),
147151 )
148152 }
149153 BodyM (
150- text = item.title, modifier = Modifier
154+ text = item.title,
155+ modifier = Modifier
151156 .weight(1f )
152- .padding(horizontal = 8 .dp)
157+ .padding(horizontal = 8 .dp),
153158 )
154159 Icon (
155160 painter = painterResource(R .drawable.ic_chevron_right),
@@ -169,6 +174,6 @@ fun ShopDiscoverScreen(
169174@Composable
170175private fun Preview () {
171176 AppThemeSurface {
172- ShopDiscoverScreen (onClose = {}, onBack = {}, navigateWebView = {})
177+ ShopDiscoverScreen (onClose = {}, onBack = {}, navigateWebView = { _, _ -> })
173178 }
174179}
0 commit comments