File size: 1,248 Bytes
391b583
 
 
fab48db
 
 
 
 
 
 
 
391b583
fab48db
 
391b583
 
 
 
 
 
fab48db
 
 
391b583
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Container, Col, Row } from 'react-bootstrap';
import NewsItem from '../molecules/NewsItem';

function NewsSection() {
    
    const newsFeeds = [
        { title: 'Feed 1', text: 'This is the first feed', imageSrc: '/placeholder1.jpg', feedHref: '' }, 
        { title: 'Feed 2', text: 'This is the second feed', imageSrc: '/placeholder1.jpg', feedHref: '' }, 
        { title: 'Feed 3', text: 'This is the third feed', imageSrc: '/placeholder1.jpg', feedHref: ''}
    ];
   
    return (
        <Container id="news" className="text-center justify-content-center align-items-center my-5">
            <h1 className='mb-5'>Tin tức</h1>
            <Row xs={1} md={2} xl={3} className="g-4">
                {Array.from(newsFeeds).map((feed, idx) => (
                    <Col key={idx}>
                        <NewsItem title={feed.title}
                            text={feed.text}
                            imageSrc={feed.imageSrc}
                            // feedHref={feed.feedHref}
                            feedHref="/news" //demo
                            >
                        </NewsItem>
                    </Col>
                ))}
            </Row>
        </Container>
    );
}

export default NewsSection;