mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
28 lines
550 B
JavaScript
28 lines
550 B
JavaScript
import { useCallback } from 'react';
|
|
import { useDispatch } from 'react-redux';
|
|
import { dashboardPageTitle } from 'store/dashboard/dashboard.actions';
|
|
|
|
export const useDispatchAction = (action) => {
|
|
const dispatch = useDispatch();
|
|
|
|
return useCallback(
|
|
(payload) => {
|
|
dispatch(action(payload));
|
|
},
|
|
[dispatch, action],
|
|
);
|
|
};
|
|
|
|
export const useDashboardPageTitle = () => {
|
|
return useDispatchAction(dashboardPageTitle);
|
|
};
|
|
|
|
export const useSetAccountsTableQuery = () => {
|
|
|
|
};
|
|
|
|
export const useAccountsTableQuery = () => {
|
|
|
|
}
|
|
|