source: src/components/settings/context/settings-context.tsx@ 5d6f37a

main
Last change on this file since 5d6f37a was 5d6f37a, checked in by Naum Shapkarovski <naumshapkarovski@…>, 7 weeks ago

add customer

  • Property mode set to 100644
File size: 472 bytes
Line 
1'use client';
2
3import { createContext, useContext } from 'react';
4//
5import { SettingsContextProps } from '../types';
6
7// ----------------------------------------------------------------------
8
9export const SettingsContext = createContext({} as SettingsContextProps);
10
11export const useSettingsContext = () => {
12 const context = useContext(SettingsContext);
13
14 if (!context) throw new Error('useSettingsContext must be use inside SettingsProvider');
15
16 return context;
17};
Note: See TracBrowser for help on using the repository browser.