News scroll title state added

This commit is contained in:
Kakabay 2023-02-01 13:40:26 +05:00
parent 8fbc83f584
commit d228e8996a
3 changed files with 15 additions and 8 deletions

View File

@ -4,11 +4,18 @@ import SectionTitle from './SectionTitle';
// Images
import placeholder from '../../assets/images/placeholder.jpg';
const NewsScroll = () => {
// Interface
interface Props {
state: boolean;
}
const NewsScroll = ({ state }: Props) => {
return (
<div className="news-scroll">
<div className="news-scroll-wrapper">
<SectionTitle title="Лента новостей" linkData={{ link: '/', title: 'Посмотреть все' }} />
{state === true ? (
<SectionTitle title="Лента новостей" linkData={{ link: '/', title: 'Посмотреть все' }} />
) : null}
<div className="news-scroll-inner">
<News
title="Президент Туркменистана провёл рабочее совещание по цифровой системе"

View File

@ -1,10 +1,10 @@
// Components
import Aside from "../components/aside/Aside";
import NewsScroll from "../components/global/NewsScroll";
import MainImg from "../components/category/MainImg";
import Aside from '../components/aside/Aside';
import NewsScroll from '../components/global/NewsScroll';
import MainImg from '../components/category/MainImg';
// Images
import Placeholder from "../assets/images/placeholder3.png";
import Placeholder from '../assets/images/placeholder3.png';
const Category = () => {
return (
@ -13,7 +13,7 @@ const Category = () => {
<div className="category-inner">
<div className="category-left">
<MainImg img={Placeholder} />
<NewsScroll />
<NewsScroll state={false} />
</div>
<div className="category-right">
<Aside />

View File

@ -7,7 +7,7 @@ const Main = () => {
<div className="news-section">
<div className="container">
<div className="news-inner">
<NewsScroll />
<NewsScroll state={true} />
<Aside />
</div>
</div>