Skip to content

Commit

Permalink
Revert work in progress for #8026 – accidentally merged (#8240)
Browse files Browse the repository at this point in the history
Co-authored-by: Rua Haszard <[email protected]>
  • Loading branch information
2 people authored and Jinksi committed Mar 28, 2024
1 parent e60152d commit 3a259bb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 39 deletions.
63 changes: 25 additions & 38 deletions client/deposits/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { useMemo } from '@wordpress/element';
import { dateI18n } from '@wordpress/date';
import { __, _n, sprintf } from '@wordpress/i18n';
import moment from 'moment';
import { Card, CardHeader } from '@wordpress/components';
import { Table, Link } from '@woocommerce/components';
import { TableCard, Link } from '@woocommerce/components';
import { onQueryChange, getQuery } from '@woocommerce/navigation';
import {
downloadCSVFile,
Expand All @@ -30,7 +29,7 @@ import { displayType, displayStatus } from '../strings';
import { formatExplicitCurrency, formatExportAmount } from 'utils/currency';
import DetailsLink, { getDetailsURL } from 'components/details-link';
import ClickableCell from 'components/clickable-cell';
import InlineNotice from 'components/inline-notice';
import Page from '../../components/page';
import DepositsFilters from '../filters';
import DownloadButton from 'components/download-button';
import { getDepositsCSV } from 'wcpay/data/deposits/resolvers';
Expand Down Expand Up @@ -361,41 +360,29 @@ export const DepositsList = (): JSX.Element => {
};

return (
<>
<InlineNotice
status="info"
icon
className="test"
isDismissible={ true }
>
Test
</InlineNotice>
<Page>
<DepositsFilters storeCurrencies={ storeCurrencies } />
<Card className="wcpay-deposits-list woocommerce-report-table">
<CardHeader>
{ __( 'Deposit history', 'woocommerce-payments' ) }
</CardHeader>

<Table
isLoading={ isLoading }
rowsPerPage={ parseInt( getQuery().per_page ?? '' ) || 25 }
totalRows={ totalRows }
headers={ columns }
rows={ rows }
summary={ summary }
query={ getQuery() }
onQueryChange={ onQueryChange }
actions={ [
downloadable && (
<DownloadButton
key="download"
isDisabled={ isLoading || isDownloading }
onClick={ onDownload }
/>
),
] }
/>
</Card>
<TableCard
className="wcpay-deposits-list woocommerce-report-table"
title={ __( 'Deposit history', 'woocommerce-payments' ) }
isLoading={ isLoading }
rowsPerPage={ parseInt( getQuery().per_page ?? '' ) || 25 }
totalRows={ totalRows }
headers={ columns }
rows={ rows }
summary={ summary }
query={ getQuery() }
onQueryChange={ onQueryChange }
actions={ [
downloadable && (
<DownloadButton
key="download"
isDisabled={ isLoading || isDownloading }
onClick={ onDownload }
/>
),
] }
/>
{ ! isDefaultSiteLanguage() &&
! isExportModalDismissed() &&
isCSVExportModalOpen && (
Expand All @@ -406,7 +393,7 @@ export const DepositsList = (): JSX.Element => {
exportType={ 'deposits' }
/>
) }
</>
</Page>
);
};

Expand Down
1 change: 0 additions & 1 deletion client/transactions/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ declare module '@woocommerce/components' {
showMenu?: boolean;
}
const TableCard: ( props: TableCardProps ) => JSX.Element;
const Table: ( props: TableCardProps ) => JSX.Element;
}

declare module '@woocommerce/navigation' {
Expand Down

0 comments on commit 3a259bb

Please sign in to comment.