Skip to content

Commit

Permalink
corrected preview composable function and removed unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
UduakUmanah10 committed Mar 22, 2024
1 parent 0f2e582 commit 27324a8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import org.mifos.mobile.utils.Toaster
@AndroidEntryPoint
class BeneficiaryAddOptionsFragment : BaseFragment() {

private lateinit var composeView: ComposeView

private var _binding: FragmentBeneficiaryAddOptionsBinding? = null
private val binding get() = _binding!!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ fun BeneficiaryScreen(
@Composable
fun BeneficiaryScreenPreview() {
MifosMobileTheme {
Column(
modifier = Modifier
.fillMaxWidth()
.fillMaxHeight(),
) {
BeneficiaryScreen({}, {}, {}, {})
}
BeneficiaryScreen({}, {}, {}, {})

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,13 @@ fun BeneficiaryScreenIcons(
@Composable
fun IconsScreenPreview() {
MifosMobileTheme {
Column(
modifier = Modifier
.fillMaxWidth()
.fillMaxHeight(),
) {
BeneficiaryScreenIcons(
modifier = Modifier.padding(top = 20.dp),
addIconclicked = {},
scanIconClicked = {},
uploadIconClicked = {}
)

}
BeneficiaryScreenIcons(
modifier = Modifier.padding(top = 20.dp),
addIconclicked = {},
scanIconClicked = {},
uploadIconClicked = {}
)

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,13 @@ fun RenderIconAndText(
@Composable
fun IconsAndTextPreview() {
MifosMobileTheme {
Column(
modifier = Modifier
.fillMaxWidth()
.fillMaxHeight(),
) {

RenderIconAndText(
icon = R.drawable.ic_qrcode_scan_gray_dark,
text = stringResource(id = R.string.scan),
icondescription = stringResource(id = R.string.scan),
iconClick = {}
)

RenderIconAndText(
icon = R.drawable.ic_qrcode_scan_gray_dark,
text = stringResource(id = R.string.scan),
icondescription = stringResource(id = R.string.scan),
iconClick = {}
)

}
}
}

0 comments on commit 27324a8

Please sign in to comment.