UNPKG

518 BJavaScriptView Raw
1import { useContext } from 'react';
2import ChannelContext from '../../components/ChannelContext';
3export function useChannelSettings() {
4 const context = useContext(ChannelContext);
5 const selectedChannelSettings = Object.assign({}, context.selectedChannel.settings);
6 // default incVat to true
7 if (typeof selectedChannelSettings.pricesIncVat === 'undefined') {
8 selectedChannelSettings.pricesIncVat = true;
9 }
10 return selectedChannelSettings;
11}
12//# sourceMappingURL=useChannelSettings.js.map
\No newline at end of file