MCPcopy
hub / github.com/github/docs / useLanguages

Function useLanguages

components/context/LanguagesContext.tsx:16–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14export const LanguagesContext = createContext<LanguagesContextT | null>(null)
15
16export const useLanguages = (): LanguagesContextT => {
17 const context = useContext(LanguagesContext)
18
19 if (!context) {
20 throw new Error('"useLanguagesContext" may only be used inside "LanguagesContext.Provider"')
21 }
22
23 return context
24}

Callers 3

HeaderNotificationsFunction · 0.90
LanguagePickerFunction · 0.90
useUserLanguageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected