12 lines
353 B
TypeScript
12 lines
353 B
TypeScript
import type { LanguageContextProps } from '@app/context/LanguageContext';
|
|
import { LanguageContext } from '@app/context/LanguageContext';
|
|
import { useContext } from 'react';
|
|
|
|
const useLocale = (): Omit<LanguageContextProps, 'children'> => {
|
|
const languageContext = useContext(LanguageContext);
|
|
|
|
return languageContext;
|
|
};
|
|
|
|
export default useLocale;
|