flags fix

This commit is contained in:
pinks 2023-09-12 03:58:13 +02:00
parent 5b365c9e17
commit 047608e92a
1 changed files with 3 additions and 2 deletions

View File

@ -106,6 +106,7 @@ const languageToFlagMap: Record<string, string> = {
};
export function getFlagEmoji(languageCode?: string): string | undefined {
if (!languageCode) return;
return languageToFlagMap[languageCode];
const language = languageCode?.split("-").pop()?.toLowerCase();
if (!language) return;
return languageToFlagMap[language];
}