Skip to content

Commit

Permalink
Add stricter type for conditional rendering
Browse files Browse the repository at this point in the history
This converts shouldShowBreakdown to boolean when rendering conditionally
  • Loading branch information
neonbhai committed Dec 20, 2023
1 parent 4bc8b2b commit fab5110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyReportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function MoneyReportView({report, shouldShowHorizontalRule}: MoneyReportViewProp
</Text>
</View>
</View>
{shouldShowBreakdown && (
{Boolean(shouldShowBreakdown) && (
<>
<View style={[styles.flexRow, styles.pointerEventsNone, styles.containerWithSpaceBetween, styles.ph5, styles.pv1]}>
<View style={[styles.flex1, styles.justifyContentCenter]}>
Expand Down

0 comments on commit fab5110

Please sign in to comment.