This commit is contained in:
Chompstation Bot
2021-06-18 04:23:03 +00:00
committed by Darlantan
parent 5f76f2e855
commit 331e5230d6
332 changed files with 23458 additions and 9666 deletions

View File

@@ -0,0 +1,17 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { useSelector, useDispatch } from 'common/redux';
import { selectAudio } from './selectors';
export const useAudio = context => {
const state = useSelector(context, selectAudio);
const dispatch = useDispatch(context);
return {
...state,
toggle: () => dispatch({ type: 'audio/toggle' }),
};
};