re-structure to monorepo.

This commit is contained in:
a.bouhuolia
2023-02-03 01:02:31 +02:00
parent 8242ec64ba
commit 7a0a13f9d5
10400 changed files with 46966 additions and 17223 deletions

View File

@@ -0,0 +1,60 @@
// @ts-nocheck
import React, { useEffect } from 'react';
import '@/style/pages/Accounts/List.scss';
import { DashboardPageContent, DashboardContentTable } from '@/components';
import { AccountsChartProvider } from './AccountsChartProvider';
import AccountsViewsTabs from './AccountsViewsTabs';
import AccountsActionsBar from './AccountsActionsBar';
import AccountsDataTable from './AccountsDataTable';
import withAccounts from '@/containers/Accounts/withAccounts';
import withAccountsTableActions from './withAccountsTableActions';
import { transformAccountsStateToQuery } from './utils';
import { compose } from '@/utils';
/**
* Accounts chart list.
*/
function AccountsChart({
// #withAccounts
accountsTableState,
accountsTableStateChanged,
// #withAccountsActions
resetAccountsTableState,
}) {
// Resets the accounts table state once the page unmount.
useEffect(
() => () => {
resetAccountsTableState();
},
[resetAccountsTableState],
);
return (
<AccountsChartProvider
query={transformAccountsStateToQuery(accountsTableState)}
tableStateChanged={accountsTableStateChanged}
>
<AccountsActionsBar />
<DashboardPageContent>
<AccountsViewsTabs />
<DashboardContentTable>
<AccountsDataTable />
</DashboardContentTable>
</DashboardPageContent>
</AccountsChartProvider>
);
}
export default compose(
withAccounts(({ accountsTableState, accountsTableStateChanged }) => ({
accountsTableState,
accountsTableStateChanged,
})),
withAccountsTableActions,
)(AccountsChart);