Skip to content

Commit

Permalink
fix: tags are now loaded as array
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 10, 2020
1 parent 182907d commit 3da790e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/specification/src/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export interface StoriesDoc {
/**
* comma-separated list of document tags, used for search
*/
tags?: string;
tags?: string[];

/**
* document author
Expand Down
4 changes: 2 additions & 2 deletions ui/app/src/PageList/PageListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ export interface PageListItemProps {
page: StoriesDoc;
}
export const PageListItem: FC<PageListItemProps> = ({ page, link }) => {
const { tags = '', date } = page;
const { tags = [], date } = page;
return (
<Flex sx={{ flexDirection: 'column' }}>
<Link href={link}>
<Subtitle>{page.title}</Subtitle>
</Link>
<Flex sx={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<div>{date ? new Date(date).toDateString() : ''}</div>
<TagsList tags={tags.split(',')} />
<TagsList tags={tags} />
</Flex>
</Flex>
);
Expand Down

0 comments on commit 3da790e

Please sign in to comment.