Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 30 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 0 |
1 | import React from 'react' |
||
2 | import PropTypes from 'prop-types' |
||
3 | import PostSummary from '~/modules/blogs/components/blogs/PostSummary' |
||
4 | import Container from '~/modules/blogs/components/blogs/Container' |
||
5 | |||
6 | 1 | const Blogs = ({ posts }) => { |
|
7 | 2 | return ( |
|
8 | <Container> |
||
9 | {posts.map(postSummary => { |
||
10 | 2 | return ( |
|
11 | <PostSummary |
||
12 | key={postSummary.slug} |
||
13 | title={postSummary.title} |
||
14 | slug={postSummary.slug} |
||
15 | brief={postSummary.brief} |
||
16 | author={postSummary.author} |
||
17 | time={postSummary.time} |
||
18 | /> |
||
19 | ) |
||
20 | })} |
||
21 | </Container> |
||
22 | ) |
||
23 | } |
||
24 | |||
25 | 1 | Blogs.propTypes = { |
|
26 | posts: PropTypes.array |
||
27 | } |
||
28 | |||
29 | export default Blogs |
||
30 |