fix: restore dangerouslySetInnerHTML for created/last login, keep friends count

dangerouslySetInnerHTML is needed for compatibility with existing
external_texts keys that contain HTML markup (e.g. <b>Created:</b>).
Only the missing friends count line is added.
This commit is contained in:
Life
2026-03-29 16:47:36 +02:00
parent 3e515e234e
commit 2a220eaa4d
@@ -41,12 +41,8 @@ export const UserContainerView: FC<{
<p className="text-sm italic leading-tight">{ userProfile.motto }</p>
</div>
<div className="flex flex-col gap-1">
<p className="text-sm leading-none">
<b>{ LocalizeText('extendedprofile.created.title') }</b> { userProfile.registration }
</p>
<p className="text-sm leading-none">
<b>{ LocalizeText('extendedprofile.last.login.title') }</b> { FriendlyTime.format(userProfile.secondsSinceLastVisit, '.ago', 2) }
</p>
<p className="text-sm leading-none" dangerouslySetInnerHTML={{ __html: LocalizeText('extendedprofile.created', ['created'], [userProfile.registration]) }} />
<p className="text-sm leading-none" dangerouslySetInnerHTML={{ __html: LocalizeText('extendedprofile.last.login', ['lastlogin'], [FriendlyTime.format(userProfile.secondsSinceLastVisit, '.ago', 2)]) }} />
<p className="text-sm leading-none">
<b>{ LocalizeText('extendedprofile.friends.count') }</b> { userProfile.friendsCount }
</p>