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

@@ -95,7 +95,7 @@ const ContentList: FunctionComponent<Props> = ({
[hideTags, selectedTag, application],
)
const hasNotes = items.some((item) => item.content_type === ContentType.Note)
const hasNotes = items.some((item) => item.content_type === ContentType.TYPES.Note)
return (
<div

View File

@@ -7,9 +7,9 @@ import { ListableContentItem } from './Types/ListableContentItem'
const ContentListItem: FunctionComponent<AbstractListItemProps<ListableContentItem>> = (props) => {
switch (props.item.content_type) {
case ContentType.Note:
case ContentType.TYPES.Note:
return <NoteListItem {...props} item={props.item as SNNote} />
case ContentType.File: {
case ContentType.TYPES.File: {
return <FileListItem {...props} item={props.item as FileItem} />
}
default: