1 | import { useContext } from 'react';
|
2 | import ChannelContext from '../../components/ChannelContext';
|
3 | export 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 |