diff --git a/app/assets/javascripts/Components/ContentListView/ContentListItem.tsx b/app/assets/javascripts/Components/ContentListView/ContentListItem.tsx index 4a92569c9..dd177c0b6 100644 --- a/app/assets/javascripts/Components/ContentListView/ContentListItem.tsx +++ b/app/assets/javascripts/Components/ContentListView/ContentListItem.tsx @@ -22,7 +22,7 @@ const ContentListItem: FunctionComponent = (props) => { return [] } - return tags.map((tag) => tag.title).sort() + return tags } switch (props.item.content_type) { diff --git a/app/assets/javascripts/Components/ContentListView/ListItemTags.tsx b/app/assets/javascripts/Components/ContentListView/ListItemTags.tsx index 31c040ecb..fac7f8b3d 100644 --- a/app/assets/javascripts/Components/ContentListView/ListItemTags.tsx +++ b/app/assets/javascripts/Components/ContentListView/ListItemTags.tsx @@ -1,9 +1,10 @@ import { FunctionComponent } from 'react' import Icon from '@/Components/Icon/Icon' +import { DisplayableListItemProps } from './Types/DisplayableListItemProps' type Props = { hideTags: boolean - tags: string[] + tags: DisplayableListItemProps['tags'] } const ListItemTags: FunctionComponent = ({ hideTags, tags }) => { @@ -16,10 +17,10 @@ const ListItemTags: FunctionComponent = ({ hideTags, tags }) => { {tags.map((tag) => ( - {tag} + {tag.title} ))} diff --git a/app/assets/javascripts/Components/ContentListView/Types/DisplayableListItemProps.ts b/app/assets/javascripts/Components/ContentListView/Types/DisplayableListItemProps.ts index ab82db9ba..e0d04d994 100644 --- a/app/assets/javascripts/Components/ContentListView/Types/DisplayableListItemProps.ts +++ b/app/assets/javascripts/Components/ContentListView/Types/DisplayableListItemProps.ts @@ -1,5 +1,9 @@ +import { SNTag } from '@standardnotes/snjs' import { AbstractListItemProps } from './AbstractListItemProps' export type DisplayableListItemProps = AbstractListItemProps & { - tags: string[] + tags: { + uuid: SNTag['uuid'] + title: SNTag['title'] + }[] }