Skip to content

Commit

Permalink
chore: show deactivated user for old mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Dec 17, 2024
1 parent 906cc05 commit 4094755
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions space/core/components/editor/embeds/mentions/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ export const EditorUserMention: React.FC<Props> = observer((props) => {
const userDetails = getMemberById(id);
const profileLink = `/${workspaceSlug}/profile/${id}`;

if (!userDetails) {
return (
<div className="not-prose inline px-1 py-0.5 rounded bg-custom-background-80 text-custom-text-300 no-underline">
@deactivated user
</div>
);
}

return (
<div
className={cn("not-prose inline px-1 py-0.5 rounded bg-yellow-500/20 text-yellow-500 no-underline", {
Expand Down
8 changes: 8 additions & 0 deletions web/core/components/editor/embeds/mentions/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ export const EditorUserMention: React.FC<Props> = observer((props) => {
const roleDetails = getProjectMemberDetails(id)?.role;
const profileLink = `/${workspaceSlug}/profile/${id}`;

if (!userDetails) {
return (
<div className="not-prose inline px-1 py-0.5 rounded bg-custom-background-80 text-custom-text-300 no-underline">
@deactivated user
</div>
);
}

return (
<div
className={cn(
Expand Down

0 comments on commit 4094755

Please sign in to comment.