chore: fix ContentType usage (#2353)
* chore: fix ContentType usage * chore: fix specs
This commit is contained in:
@@ -60,7 +60,7 @@ export const ItemSelectionPlugin: FunctionComponent<Props> = ({ currentNote }) =
|
||||
return new ItemOption(item, item.title || '', {
|
||||
onSelect: (_queryString: string) => {
|
||||
void linkingController.linkItems(currentNote, item)
|
||||
if (item.content_type === ContentType.File) {
|
||||
if (item.content_type === ContentType.TYPES.File) {
|
||||
editor.dispatchCommand(INSERT_FILE_COMMAND, item.uuid)
|
||||
} else {
|
||||
editor.dispatchCommand(INSERT_BUBBLE_COMMAND, item.uuid)
|
||||
|
||||
@@ -9,7 +9,7 @@ const ReadonlyPlugin = ({ note }: { note: SNNote }) => {
|
||||
const [readOnly, setReadOnly] = useState(note.locked)
|
||||
|
||||
useEffect(() => {
|
||||
return application.streamItems<SNNote>(ContentType.Note, ({ changed }) => {
|
||||
return application.streamItems<SNNote>(ContentType.TYPES.Note, ({ changed }) => {
|
||||
const changedNoteItem = changed.find((changedItem) => changedItem.uuid === note.uuid)
|
||||
|
||||
if (changedNoteItem) {
|
||||
|
||||
@@ -55,7 +55,7 @@ const SuperNoteConverter = ({
|
||||
return undefined
|
||||
}
|
||||
|
||||
const templateNoteForRevision = application.items.createTemplateItem<NoteContent, SNNote>(ContentType.Note, {
|
||||
const templateNoteForRevision = application.items.createTemplateItem<NoteContent, SNNote>(ContentType.TYPES.Note, {
|
||||
title: note.title,
|
||||
text: convertedContent,
|
||||
references: note.references,
|
||||
|
||||
Reference in New Issue
Block a user