diff --git a/src/components/news/News.tsx b/src/components/news/News.tsx index 2b66335..7d4aa74 100644 --- a/src/components/news/News.tsx +++ b/src/components/news/News.tsx @@ -1,23 +1,24 @@ // Modules -import { Link } from "react-router-dom"; -import { LazyLoadImage } from "react-lazy-load-image-component"; -import { v4 as uuidv4 } from "uuid"; -import ReactPlayer from "react-player"; +import { Link } from 'react-router-dom'; +import { LazyLoadImage } from 'react-lazy-load-image-component'; +import { v4 as uuidv4 } from 'uuid'; +import ReactPlayer from 'react-player'; // Components -import NewsCategory from "../global/NewsCategory"; -import NewsDate from "../global/NewsDate"; -import { IPostsData } from "../../types/data.types"; -import placeholder from "../../assets/images/placeholder.webp"; +import NewsCategory from '../global/NewsCategory'; +import NewsDate from '../global/NewsDate'; +import { IPostsData } from '../../types/data.types'; +import placeholder from '../../assets/images/placeholder.webp'; +import { dateParse } from '../../helpers/dateParser'; interface Props { - id: IPostsData["id"]; - title: IPostsData["title"]; - text: IPostsData["content_html"]; - categories: IPostsData["categories"]; - date: IPostsData["published_at"]; - img: IPostsData["featured_images"][0]["path"]; - video: IPostsData["video"]; + id: IPostsData['id']; + title: IPostsData['title']; + text: IPostsData['content_html']; + categories: IPostsData['categories']; + date: IPostsData['published_at']; + img: IPostsData['featured_images'][0]['path']; + video: IPostsData['video']; } const News = ({ id, title, text, categories, date, img, video }: Props) => { @@ -26,13 +27,7 @@ const News = ({ id, title, text, categories, date, img, video }: Props) => {
{video && video.length > 0 ? ( - + ) : ( { })}
- +
-
+