[WIKI-391] chore: handle deactivated user display name in version history #7171
This commit is contained in:
parent
053c895120
commit
950fcfdb40
3 changed files with 8 additions and 5 deletions
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue