diff --git a/components/sections/blog/components/Post.tsx b/components/sections/blog/components/Post.tsx index d889c2cca..fe928fa33 100644 --- a/components/sections/blog/components/Post.tsx +++ b/components/sections/blog/components/Post.tsx @@ -10,15 +10,24 @@ import OrangeClock from '../../../../public/orange_clock.png' import OrangeAuthor from '../../../../public/orange_author.png' import { Button } from '../../../common' import LocalTypography from './LocalTypography' -import { BiCalendarAlt } from "react-icons/bi"; +import { BiCalendarAlt } from 'react-icons/bi' interface PostProps { - data: Omit & { author: SanityAuthor } + data: Omit & { author: SanityAuthor } featured?: boolean } const Post: FC = ({ data, featured }): ReactElement => { - const { title, topics, published_date, coverImage, author, summary, slug, blogContent } = data + const { + title, + topics, + published_date, + coverImage, + author, + summary, + slug, + blogContent, + } = data const src = coverImage || '' const href = `/blog/${slug?.current}` @@ -46,8 +55,8 @@ const Post: FC = ({ data, featured }): ReactElement => { )}
-
- Cover +
+ Cover
@@ -61,7 +70,10 @@ const Post: FC = ({ data, featured }): ReactElement => {
- + {title} @@ -75,14 +87,14 @@ const Post: FC = ({ data, featured }): ReactElement => {
Time
- {`${getReadTime(blogContent || "")} ${ - getReadTime(blogContent || "") === 1 ? 'min' : 'mins' + {`${getReadTime(blogContent || '')} ${ + getReadTime(blogContent || '') === 1 ? 'min' : 'mins' } read`} - { published_date && ( + {published_date && ( <>
- +
@@ -90,7 +102,9 @@ const Post: FC = ({ data, featured }): ReactElement => { )}
- {getDisplaySummary()} + + {getDisplaySummary()} +