diff --git a/src/components/Article/Article.tsx b/src/components/Article/Article.tsx index 98174be..0d5eee0 100644 --- a/src/components/Article/Article.tsx +++ b/src/components/Article/Article.tsx @@ -1,12 +1,12 @@ import { FC } from 'react'; import Box from '@mui/material/Box' -import Chip from '@mui/material/Chip' import Divider from '@mui/material/Divider' import Stack from '@mui/material/Stack' import Typography from '@mui/material/Typography' +import TagChips from '../TagChips/TagChips'; -interface Article { +interface ArticleProps { title: string subtitle: string body: string @@ -14,14 +14,13 @@ interface Article { tags: string[] } -const Article: FC
= ({ +const Article: FC = ({ title, subtitle, body, date, tags, }) => { - console.log(date.toLocaleString()) return {title} {subtitle} @@ -31,13 +30,7 @@ const Article: FC
= ({ Posted: {date.toLocaleDateString()} - {tags.map((tag: string) => { - return - })} + diff --git a/src/components/TagChips/TagChips.tsx b/src/components/TagChips/TagChips.tsx new file mode 100644 index 0000000..536e843 --- /dev/null +++ b/src/components/TagChips/TagChips.tsx @@ -0,0 +1,19 @@ +import { FC } from 'react'; + +import Chip from '@mui/material/Chip' + +interface TagChipsProps { + tags: string[] +} + +const TagChips: FC = ({ tags }) => { + return tags.map((tag: string) => { + return + }) +} + +export default TagChips