feat(email): use friendly lang display name

This commit is contained in:
Darren Yu 2025-08-21 22:28:57 +08:00
parent a837a752a6
commit f7cbaf83e2
No known key found for this signature in database
GPG Key ID: 2D69AA5646405984

View File

@ -130,9 +130,10 @@ const EmailTemplateEditor: React.FC<EmailTemplateEditorProps> = ({ value, onChan
scrollButtons="auto"
sx={{ flexGrow: 1 }}
>
{templates.map((template, index) => (
<Tab key={index} label={template.language} />
))}
{templates.map((template, index) => {
const lang = languages.find((l) => l.code === template.language);
return <DraggableTab key={index} index={index} label={lang ? lang.displayName : template.language} />;
})}
</Tabs>
<Button
startIcon={<Add />}