From cc07f509120501f6199704f9a467b2329018f14e Mon Sep 17 00:00:00 2001 From: Nagesh Pai Date: Thu, 19 Dec 2024 20:26:44 +0530 Subject: [PATCH] Payouts - remove language modal code --- client/deposits/list/index.tsx | 30 +---------------------------- client/deposits/list/test/index.tsx | 2 ++ 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/client/deposits/list/index.tsx b/client/deposits/list/index.tsx index 1b299ddf0d1..0b1f54479fb 100644 --- a/client/deposits/list/index.tsx +++ b/client/deposits/list/index.tsx @@ -38,8 +38,6 @@ import DownloadButton from 'components/download-button'; import { getDepositsCSV } from 'wcpay/data/deposits/resolvers'; import { applyThousandSeparator } from '../../utils/index.js'; import DepositStatusChip from 'components/deposit-status-chip'; -import { isExportModalDismissed, isDefaultSiteLanguage } from 'utils'; -import CSVExportModal from 'components/csv-export-modal'; import './style.scss'; @@ -106,8 +104,6 @@ export const DepositsList = (): JSX.Element => { getQuery() ); - const [ isCSVExportModalOpen, setCSVExportModalOpen ] = useState( false ); - const sortByDate = ! getQuery().orderby || 'date' === getQuery().orderby; const columns = useMemo( () => getColumns( sortByDate ), [ sortByDate ] ); const totalRows = depositsSummary.count || 0; @@ -305,11 +301,7 @@ export const DepositsList = (): JSX.Element => { const downloadType = totalRows > rows.length ? 'endpoint' : 'browser'; if ( 'endpoint' === downloadType ) { - if ( ! isDefaultSiteLanguage() && ! isExportModalDismissed() ) { - setCSVExportModalOpen( true ); - } else { - endpointExport(); - } + endpointExport(); } else { const params = getQuery(); @@ -349,16 +341,6 @@ export const DepositsList = (): JSX.Element => { setIsDownloading( false ); }; - const closeModal = () => { - setCSVExportModalOpen( false ); - }; - - const exportDeposits = () => { - endpointExport(); - - closeModal(); - }; - return ( @@ -383,16 +365,6 @@ export const DepositsList = (): JSX.Element => { ), ] } /> - { ! isDefaultSiteLanguage() && - ! isExportModalDismissed() && - isCSVExportModalOpen && ( - - ) } ); }; diff --git a/client/deposits/list/test/index.tsx b/client/deposits/list/test/index.tsx index 8eb1c3b9f78..f39047a10f9 100644 --- a/client/deposits/list/test/index.tsx +++ b/client/deposits/list/test/index.tsx @@ -88,6 +88,7 @@ declare const global: { reporting?: { exportModalDismissed: boolean; }; + locale: { code: string }; }; }; @@ -153,6 +154,7 @@ describe( 'Deposits list', () => { reporting: { exportModalDismissed: true, }, + locale: { code: 'en' }, }; } );