aside news corrected

This commit is contained in:
Kakabay 2023-02-07 10:31:35 +05:00
parent e737be0dff
commit 1f09778132
1 changed files with 14 additions and 17 deletions

View File

@ -1,44 +1,41 @@
// Modules
import { Link } from "react-router-dom";
import { LazyLoadImage } from "react-lazy-load-image-component";
import { Link } from 'react-router-dom';
import { LazyLoadImage } from 'react-lazy-load-image-component';
// Images
import { ReactComponent as ArrRight } from "../../assets/icons/arrow-right.svg";
import { ReactComponent as ArrRight } from '../../assets/icons/arrow-right.svg';
// Components
import NewsCategory from "../global/NewsCategory";
import NewsDate from "../global/NewsDate";
import NewsCategory from '../global/NewsCategory';
import NewsDate from '../global/NewsDate';
interface Props {
title: string;
date: string;
img: string;
category: string;
link: string;
}
const AsideNews = ({ title, date, img }: Props) => {
const AsideNews = ({ title, date, img, category, link }: Props) => {
return (
<div className="aside-news">
<Link to={link} className="aside-news">
<div className="aside-news-wrapper">
<div className="aside-news-image">
<LazyLoadImage
src={img}
alt="image"
useIntersectionObserver
effect="blur"
/>
<LazyLoadImage src={img} alt="image" useIntersectionObserver effect="blur" />
</div>
<div className="aside-news-info">
<div className="aside-news-info-inner">
<div className="aside-news-status">
<NewsCategory title="политика" />
<NewsCategory title={category} />
<NewsDate date={date} />
</div>
<h2 className="aside-news-title">{title}</h2>
</div>
<Link to={`/news/1`} className="aside-news-link">
{/* <Link to={link} className="aside-news-link">
<span>прочитать все</span> <ArrRight />
</Link> */}
</div>
</div>
</Link>
</div>
</div>
</div>
);
};