[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

@ -1,8 +1,8 @@
import { observer } from "mobx-react";
import Link from "next/link";
// plane types
// plane imports
import { useTranslation } from "@plane/i18n";
import { TPageVersion } from "@plane/types";
// plane ui
import { Avatar } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
@ -23,6 +23,8 @@ export const PlaneVersionsSidebarListItem: React.FC<Props> = observer((props) =>
const { getUserDetails } = useMember();
// derived values
const ownerDetails = getUserDetails(version.owned_by);
// translation
const { t } = useTranslation();
return (
<Link
@ -42,7 +44,7 @@ export const PlaneVersionsSidebarListItem: React.FC<Props> = observer((props) =>
size="sm"
className="flex-shrink-0"
/>
<span className="text-custom-text-300">{ownerDetails?.display_name}</span>
<span className="text-custom-text-300">{ownerDetails?.display_name ?? t("common.deactivated_user")}</span>
</p>
</Link>
);