From d53e7ea591eba32d5540b67ad0a16636f4d9bef6 Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Thu, 10 Jul 2025 17:38:31 +0200 Subject: [PATCH] Revert "Add dropdown button to empty report" --- src/CONST/index.ts | 1 + src/components/EmptyStateComponent/index.tsx | 38 ++++++------------ src/components/EmptyStateComponent/types.ts | 11 +---- src/components/MoneyReportHeader.tsx | 9 +++++ .../MoneyRequestReportActionsList.tsx | 11 ++--- .../MoneyRequestReportTransactionList.tsx | 8 +--- .../SearchMoneyRequestReportEmptyState.tsx | 40 +------------------ src/languages/de.ts | 3 +- src/languages/en.ts | 2 +- src/languages/es.ts | 2 +- src/languages/fr.ts | 2 +- src/languages/it.ts | 2 +- src/languages/ja.ts | 2 +- src/languages/nl.ts | 2 +- src/languages/pl.ts | 2 +- src/languages/pt-BR.ts | 2 +- src/languages/zh-hans.ts | 2 +- src/libs/ReportPrimaryActionUtils.ts | 4 ++ src/libs/ReportSecondaryActionUtils.ts | 2 +- tests/unit/ReportPrimaryActionUtilsTest.ts | 4 +- 20 files changed, 46 insertions(+), 103 deletions(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 199e9cbe1a6a..d30f9c8d4427 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -1065,6 +1065,7 @@ const CONST = { REMOVE_HOLD: 'removeHold', REVIEW_DUPLICATES: 'reviewDuplicates', MARK_AS_CASH: 'markAsCash', + ADD_EXPENSE: 'addExpense', }, TRANSACTION_PRIMARY_ACTIONS: { REMOVE_HOLD: 'removeHold', diff --git a/src/components/EmptyStateComponent/index.tsx b/src/components/EmptyStateComponent/index.tsx index f4f17d402608..5bd82115fbcd 100644 --- a/src/components/EmptyStateComponent/index.tsx +++ b/src/components/EmptyStateComponent/index.tsx @@ -3,7 +3,6 @@ import isEmpty from 'lodash/isEmpty'; import React, {useMemo, useState} from 'react'; import {View} from 'react-native'; import Button from '@components/Button'; -import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu'; import ImageSVG from '@components/ImageSVG'; import Lottie from '@components/Lottie'; import Text from '@components/Text'; @@ -104,30 +103,19 @@ function EmptyStateComponent({ {subtitleText ?? {subtitle}} {children} {!isEmpty(buttons) && ( - - {buttons?.map(({buttonText, buttonAction, success, icon, isDisabled, style, dropDownOptions}) => - dropDownOptions ? ( - {}} - shouldAlwaysShowDropdownMenu - customText={buttonText} - options={dropDownOptions} - isSplitButton={false} - style={[styles.flex1, style]} - /> - ) : ( -