feat: fix items list datatable.

This commit is contained in:
a.bouhuolia
2021-02-08 13:17:11 +02:00
parent adac2386bb
commit 304f0c9ae5
43 changed files with 777 additions and 835 deletions

View File

@@ -1,10 +1,27 @@
import { useCallback } from 'react';
import { useDispatch } from 'react-redux';
import { dashboardPageTitle } from 'store/dashboard/dashboard.actions';
export const useDashboardPageTitle = () => {
export const useDispatchAction = (action) => {
const dispatch = useDispatch();
return (pageTitle) => {
dispatch(dashboardPageTitle(pageTitle));
}
return useCallback(
(payload) => {
dispatch(action(payload));
},
[dispatch, action],
);
};
export const useDashboardPageTitle = () => {
return useDispatchAction(dashboardPageTitle);
};
export const useSetAccountsTableQuery = () => {
};
export const useAccountsTableQuery = () => {
}