[WIKI-391] chore: handle deactivated user display name in version history #7171

This commit is contained in:
Aaryan Khandelwal 2025-06-06 15:04:00 +05:30 committed by GitHub
parent 053c895120
commit 950fcfdb40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View file

@ -31,7 +31,7 @@ export const DescriptionVersionsDropdownItem: React.FC<Props> = observer((props)
/>
</span>
<p className="text-xs text-custom-text-200 flex items-center gap-1.5">
<span className="font-medium">{versionCreator?.display_name}</span>
<span className="font-medium">{versionCreator?.display_name ?? t("common.deactivated_user")}</span>
<span>{calculateTimeAgo(version.last_saved_at)}</span>
</p>
</CustomMenu.MenuItem>

View file

@ -40,7 +40,8 @@ export const DescriptionVersionsDropdown: React.FC<Props> = observer((props) =>
</span>
<p className="text-xs">
{t("description_versions.last_edited_by")}{" "}
<span className="font-medium">{lastUpdatedByUserDisplayName}</span> {calculateTimeAgo(lastUpdatedAt)}
<span className="font-medium">{lastUpdatedByUserDisplayName ?? t("common.deactivated_user")}</span>{" "}
{calculateTimeAgo(lastUpdatedAt)}
</p>
</div>
}