fix: uuid7 for commentId (#524)
This commit is contained in:
parent
c717847ca8
commit
ddb0f9225f
1 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ import {
|
||||||
showCommentPopupAtom,
|
showCommentPopupAtom,
|
||||||
} from "@/features/comment/atoms/comment-atom";
|
} from "@/features/comment/atoms/comment-atom";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v7 as uuid7 } from "uuid";
|
||||||
import { isCellSelection, isTextSelected } from "@docmost/editor-ext";
|
import { isCellSelection, isTextSelected } from "@docmost/editor-ext";
|
||||||
import { LinkSelector } from "@/features/editor/components/bubble-menu/link-selector.tsx";
|
import { LinkSelector } from "@/features/editor/components/bubble-menu/link-selector.tsx";
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ export const EditorBubbleMenu: FC<EditorBubbleMenuProps> = (props) => {
|
||||||
name: "comment",
|
name: "comment",
|
||||||
isActive: () => props.editor.isActive("comment"),
|
isActive: () => props.editor.isActive("comment"),
|
||||||
command: () => {
|
command: () => {
|
||||||
const commentId = uuidv4();
|
const commentId = uuid7();
|
||||||
|
|
||||||
props.editor.chain().focus().setCommentDecoration().run();
|
props.editor.chain().focus().setCommentDecoration().run();
|
||||||
setDraftCommentId(commentId);
|
setDraftCommentId(commentId);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue