Skip to content

Commit

Permalink
use helper
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Dec 21, 2023
1 parent 54b82a6 commit 841969a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {showContextMenuForReport} from '@components/ShowContextMenuContext';
import Text from '@components/Text';
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize';
import useLocalize from '@hooks/useLocalize';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import compose from '@libs/compose';
Expand Down Expand Up @@ -120,6 +121,7 @@ const defaultProps = {
function ReportPreview(props) {
const theme = useTheme();
const styles = useThemeStyles();
const {getLineHeightStyle} = useStyleUtils();
const {translate} = useLocalize();

const managerID = props.iouReport.managerID || 0;
Expand Down Expand Up @@ -244,17 +246,7 @@ function ReportPreview(props) {
<View style={styles.reportPreviewBoxBody}>
<View style={styles.flexRow}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Text
style={[
styles.textLabelSupporting,
styles.mb1,
{
lineHeight: variables.lineHeightXXLarge,
},
]}
>
{getPreviewMessage()}
</Text>
<Text style={[styles.textLabelSupporting, styles.mb1, getLineHeightStyle(variables.lineHeightXXLarge)]}>{getPreviewMessage()}</Text>
</View>
{!iouSettled && hasErrors && (
<Icon
Expand Down

0 comments on commit 841969a

Please sign in to comment.