fix: wrap server display names with Twemoji for cross-platform emoji rendering

This commit is contained in:
Dmitry Lunin
2026-04-21 23:03:20 +03:00
parent bfa5f7ae7f
commit d75440bfe4
10 changed files with 56 additions and 10 deletions

View File

@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
import { adminRemnawaveApi, SquadWithLocalInfo } from '../api/adminRemnawave';
import { AdminBackButton } from '../components/admin';
import { ServerIcon, UsersIcon, CheckIcon, XIcon } from '../components/icons';
import Twemoji from 'react-twemoji';
// Country flags helper
const getCountryFlag = (code: string | null | undefined): string => {
if (!code) return '🌍';
@@ -112,7 +113,9 @@ export default function AdminRemnawaveSquadDetail() {
</div>
<div>
<h1 className="text-xl font-semibold text-dark-100">
{squad.display_name || squad.name}
<Twemoji options={{ className: 'twemoji', folder: 'svg', ext: '.svg' }}>
{squad.display_name || squad.name}
</Twemoji>
</h1>
<p className="text-sm text-dark-400">{squad.name}</p>
</div>