* MED-88: add doctor email notifications * add logging, send open jobs notification on partial analysis response * update permissions * fix import, permissions * casing, let email be null * unused import
18 lines
452 B
TypeScript
18 lines
452 B
TypeScript
import { useMemo } from 'react';
|
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
function useLanguageName(currentLanguage: string) {
|
|
return useMemo(() => {
|
|
return new Intl.DisplayNames([currentLanguage], {
|
|
type: 'language',
|
|
});
|
|
}, [currentLanguage]);
|
|
}
|
|
|
|
export function useCurrentLocaleLanguageNames() {
|
|
const { i18n } = useTranslation();
|
|
const { language: currentLanguage } = i18n;
|
|
return useLanguageName(currentLanguage);
|
|
}
|