Skip to content

Commit

Permalink
Merge pull request #2055 from daostack/CW-Hotfix-mention-naming
Browse files Browse the repository at this point in the history
CW-Hotfix-mention Added getUserName util
  • Loading branch information
andreymikhadyuk authored Sep 12, 2023
2 parents dde1cf6 + 051eb80 commit ace6922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/ui-kit/TextEditor/utils/insertMention.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Transforms } from "slate";
import { ReactEditor } from "slate-react";
import { getUserName } from "@/shared/utils";
import { ElementType } from "../constants";
import { MentionElement } from "../types";

export const insertMention = (editor, character) => {
const mention: MentionElement = {
type: ElementType.Mention,
displayName: `${character?.displayName} `,
displayName: `${getUserName(character)} `,
userId: character?.uid,
children: [{ text: "" }],
};
Expand Down

0 comments on commit ace6922

Please sign in to comment.