Skip to content

Commit 41b1885

Browse files
authored
Merge pull request Expensify#64990 from linhvovan29546/fix/64237-remove-hasError-prop
fix: remove hasError prop
2 parents c5d9bf0 + d4d7728 commit 41b1885

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

src/components/ReceiptEmptyState.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import * as Expensicons from './Icon/Expensicons';
1010
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
1111

1212
type ReceiptEmptyStateProps = {
13-
/** Whether or not there is an error */
14-
hasError?: boolean;
15-
1613
/** Callback to be called on onPress */
1714
onPress?: () => void;
1815

@@ -32,7 +29,7 @@ type ReceiptEmptyStateProps = {
3229
};
3330

3431
// Returns an SVG icon indicating that the user should attach a receipt
35-
function ReceiptEmptyState({hasError = false, onPress, disabled = false, isThumbnail = false, isInMoneyRequestView = false, shouldUseFullHeight = false, style}: ReceiptEmptyStateProps) {
32+
function ReceiptEmptyState({onPress, disabled = false, isThumbnail = false, isInMoneyRequestView = false, shouldUseFullHeight = false, style}: ReceiptEmptyStateProps) {
3633
const styles = useThemeStyles();
3734
const {translate} = useLocalize();
3835
const theme = useTheme();
@@ -43,7 +40,6 @@ function ReceiptEmptyState({hasError = false, onPress, disabled = false, isThumb
4340
styles.justifyContentCenter,
4441
styles.moneyRequestViewImage,
4542
isThumbnail && !isInMoneyRequestView ? styles.moneyRequestAttachReceiptThumbnail : styles.moneyRequestAttachReceipt,
46-
hasError && styles.borderColorDanger,
4743
shouldUseFullHeight && styles.receiptEmptyStateFullHeight,
4844
style,
4945
];

src/components/ReportActionItem/MoneyRequestView.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
564564
style={styles.mv3}
565565
>
566566
<ReceiptEmptyState
567-
hasError={hasErrors}
568567
disabled={!canEditReceipt}
569568
onPress={() => {
570569
if (!transaction?.transactionID || !report?.reportID) {

0 commit comments

Comments
 (0)