mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
11 lines
349 B
JavaScript
11 lines
349 B
JavaScript
import { useCallback } from "react";
|
|
import { useDispatch } from "react-redux";
|
|
import { setOrganizations } from 'store/organizations/organizations.actions';
|
|
|
|
export const useSetOrganizations = () => {
|
|
const dispatch = useDispatch();
|
|
|
|
return useCallback((organizations) => {
|
|
dispatch(setOrganizations(organizations))
|
|
}, [dispatch]);
|
|
}; |