fix: fixed eslint errors
Some checks failed
Frontend CI / Lint and Build Frontend (pull_request) Failing after 21s
Some checks failed
Frontend CI / Lint and Build Frontend (pull_request) Failing after 21s
This commit is contained in:
10
frontend/src/hooks/useLanguage.js
Normal file
10
frontend/src/hooks/useLanguage.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useContext } from 'react';
|
||||
import { LanguageContext } from '../contexts/languageContextData';
|
||||
|
||||
export const useLanguage = () => {
|
||||
const context = useContext(LanguageContext);
|
||||
if (!context) {
|
||||
throw new Error('useLanguage must be used within a LanguageProvider');
|
||||
}
|
||||
return context;
|
||||
};
|
||||
Reference in New Issue
Block a user