We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 297a5a7 commit 45f010bCopy full SHA for 45f010b
src/context/LangContext.tsx
@@ -29,6 +29,7 @@ export function LangProvider({ children }: { children: React.ReactNode }) {
29
return <LangContext.Provider value={{ lang, setLang, t }}>{children}</LangContext.Provider>
30
}
31
32
+// eslint-disable-next-line react-refresh/only-export-components
33
export function useLang() {
34
const ctx = useContext(LangContext)
35
if (!ctx) throw new Error('useLang must be used within LangProvider')
0 commit comments