14 lines
356 B
React
Raw Normal View History

2023-12-15 19:53:17 +04:00
import { useContext } from 'react';
import { CurrentGroupContext } from '../CurrentGroupProvider.jsx';
import { groupChange } from '../reducers/CurrentGroupReducer.jsx';
const useGroup = () => {
const { dispatch } = useContext(CurrentGroupContext);
return {
groupChange: (group) => dispatch(groupChange(group)),
};
};
export default useGroup;