mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
60
src/containers/Items/ItemsList.js
Normal file
60
src/containers/Items/ItemsList.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import React from 'react';
|
||||
import { compose } from 'utils';
|
||||
|
||||
import 'style/pages/Items/List.scss';
|
||||
|
||||
import { DashboardPageContent } from 'components';
|
||||
|
||||
import ItemsActionsBar from './ItemsActionsBar';
|
||||
import ItemsAlerts from './ItemsAlerts';
|
||||
import ItemsViewsTabs from './ItemsViewsTabs';
|
||||
import ItemsDataTable from './ItemsDataTable';
|
||||
|
||||
import { ItemsListProvider } from './ItemsListProvider';
|
||||
|
||||
import withItems from './withItems';
|
||||
import withItemsActions from './withItemsActions';
|
||||
|
||||
/**
|
||||
* Items list.
|
||||
*/
|
||||
function ItemsList({
|
||||
// #withItems
|
||||
itemsTableState,
|
||||
itemsTableStateChanged,
|
||||
|
||||
// #withItemsActions
|
||||
resetItemsTableState,
|
||||
}) {
|
||||
// Resets items table query state once the page unmount.
|
||||
React.useEffect(
|
||||
() => () => {
|
||||
resetItemsTableState();
|
||||
},
|
||||
[resetItemsTableState],
|
||||
);
|
||||
|
||||
return (
|
||||
<ItemsListProvider
|
||||
tableState={itemsTableState}
|
||||
tableStateChanged={itemsTableStateChanged}
|
||||
>
|
||||
<ItemsActionsBar />
|
||||
|
||||
<DashboardPageContent>
|
||||
<ItemsViewsTabs />
|
||||
<ItemsDataTable />
|
||||
</DashboardPageContent>
|
||||
|
||||
<ItemsAlerts />
|
||||
</ItemsListProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withItemsActions,
|
||||
withItems(({ itemsTableState, itemsTableStateChanged }) => ({
|
||||
itemsTableState,
|
||||
itemsTableStateChanged,
|
||||
})),
|
||||
)(ItemsList);
|
||||
Reference in New Issue
Block a user