File size: 353 Bytes
95b5a04
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import { use } from 'react';
import { ConfigContext } from 'contexts/ConfigContext';

// ==============================|| CONFIG - HOOKS ||============================== //

export default function useConfig() {
  const context = use(ConfigContext);

  if (!context) throw new Error('useSConfig must be use inside ConfigProvider');

  return context;
}