mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
27
src/hooks/state/dashboard.js
Normal file
27
src/hooks/state/dashboard.js
Normal file
@@ -0,0 +1,27 @@
|
||||
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 = () => {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user