ui: add fallback to display language code if no emoji / flag

This commit is contained in:
henrygd
2026-02-20 15:46:24 -05:00
parent 4cfb2a86ad
commit e13a99fdac
3 changed files with 15 additions and 3 deletions

View File

@@ -32,7 +32,10 @@ export function LangToggle() {
className={cn("px-2.5 flex gap-2.5 cursor-pointer", lang === i18n.locale && "bg-accent/70 font-medium")}
onClick={() => dynamicActivate(lang)}
>
<span>{e}</span> {label}
<span>
{e || <code className="font-mono bg-muted text-[.65em] w-5 h-4 grid place-items-center">{lang}</code>}
</span>{" "}
{label}
</DropdownMenuItem>
))}
</DropdownMenuContent>