chore: fix ContentType usage (#2353)

* chore: fix ContentType usage

* chore: fix specs
This commit is contained in:
Karol Sójko
2023-07-12 13:53:29 +02:00
committed by GitHub
parent d057cdff84
commit 325737bfbd
247 changed files with 1092 additions and 1060 deletions

View File

@@ -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)

View File

@@ -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) {

View File

@@ -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,